Commit 119b70d2 authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

fix: solve several format issues in the new logging system

parents eff57768 b69574e1
......@@ -16,7 +16,8 @@ from .maplot import AriaEcContactMap
from .converter import AriaEcBbConverter, AriaEcXMLConverter, \
AriaEcConfigConverter
from .reader import MapFile
from .pdbdist import PDBDist
## TODO: Solve dependencie issue with mdanalysis and pbxplore
#from .pdbdist import PDBDist
from .pdbstat import PDBStat
from .setup import AriaEcSetup
from .pdbqual import AriaEcPdbqual
......@@ -697,8 +698,9 @@ class AriaEcCommands(CLI):
def pdbdist(self):
"""Extract pdb distance distributions"""
inst = PDBDist(self.create_settings())
inst.run()
# TODO: See todo at the beginning of this file
#inst = PDBDist(self.create_settings())
#inst.run()
def pdbstat(self):
"""Analyse pdb distance distribution"""
......
......@@ -225,6 +225,21 @@ class AriaBaseClass:
if name is not None:
self._set_name(name)
if self.__class__.display_debug:
logging.getLogger().setLevel(logging.DEBUG)
def __getstate__(self):
"""
Remove logger attribute in order to pickle every ariabase object instance
"""
d = dict(self.__dict__)
del d['logger']
return d
def __setstate__(self, d):
d['logger'] = logging.getLogger(self.__module__)
self.__dict__.update(d)
if self.__class__.display_debug:
logging.getLogger().setLevel(logging.DEBUG)
......@@ -429,7 +444,8 @@ class AriaBaseClass:
if self.warnings_as_errors:
self.error(msg=msg)
else:
self.__print('WARNING', msg, verbose_level, func=func)
prefix = self.__compile_name('WARNING')
self.__print(prefix, msg, verbose_level, func=func)
def halt(self):
"""aborts ARIA"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment