_user = os.environ['USER']
# wambeke is christian at home
-_developpers = ["christian", "wambeke",] # ...who wants
+_developers = ["christian", "wambeke",] # ...who wants
def errPrint(aStr):
"""stderr to avoid write in html or xml file log message"""
"""
Format a stack trace and the exception information.
as traceback.format_exception(),
- with all traceback only if user in ._developpers
+ with all traceback only if user in ._developers
"""
etype, value, tb = sys.exc_info()
- if _user in _developpers:
+ if _user in _developers:
res = "\n" + msg
if tb:
res += "\nTraceback (most recent call last):\n"
filter_function = exclude_VCS_and_extensions
# Add the files to the tarfile object
- # res = add_files(tar, archive_name, d_files_to_add, logger, f_exclude=filter_function)
+ res = add_files(tar, archive_name, d_files_to_add, logger, f_exclude=filter_function)
tar.close()
except KeyboardInterrupt:
logger.write(src.printcolors.printcError("\nERROR: forced interruption\n"), 1)
shutil.rmtree(tmp_local_working_dir)
# have to decide some time
- DBG.tofix("make shutil.rmtree('%s') effective" % tmp_working_dir, "", DBG.isDevelopper())
+ DBG.tofix("make shutil.rmtree('%s') effective" % tmp_working_dir, "", DBG.isDeveloper())
# Print again the path of the package
logger.write("\n", 2)
_user = os.environ['USER']
# wambeke is christian at home
-_developpers = ["christian", "wambeke", "crouzet"] # crouzet, kloss ...
+_developers = ["christian", "wambeke", "crouzet"] # crouzet, kloss ...
-def isDevelopper():
- """if you are a developper, sometimes you want verbose traces etc."""
- res = _user in _developpers
+def isDeveloper():
+ """if you are a developer, sometimes you want verbose traces etc."""
+ res = _user in _developers
return res
def indent(text, amount=2, ch=' '):
"""
Format a stack trace and the exception information.
as traceback.format_exception(), without color
- with traceback only if (_debug) or (DBG._user in DBG._developpers)
+ with traceback only if (_debug) or (DBG._user in DBG._developers)
"""
etype, value, tb = sys.exc_info()
- if (_debug[-1]) or (_user in _developpers):
+ if _debug[-1] or isDeveloper():
res = msg
if tb:
res += "\nTraceback (most recent call last):\n"
"""
Format a stack trace and the exception information.
as traceback.format_exception(), with color
- with traceback only if (_debug) or (DBG._user in DBG._developpers)
+ with traceback only if _debug or isDeveloper())
"""
etype, value, tb = sys.exc_info()
- if (_debug[-1]) or (_user in _developpers):
+ if _debug[-1] or isDeveloper():
res = "<red>" + msg
if tb:
res += "<yellow>\nTraceback (most recent call last):\n"