Rev4553, Debug messages formatting Windows fix
This commit is contained in:
parent
1b4f93f14b
commit
ecfb6b6b3a
2 changed files with 5 additions and 6 deletions
|
@ -14,7 +14,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.7.2"
|
self.version = "0.7.2"
|
||||||
self.rev = 4551
|
self.rev = 4553
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.test_parser = None
|
self.test_parser = None
|
||||||
|
|
|
@ -28,12 +28,11 @@ def formatExceptionMessage(err):
|
||||||
return "%s: %s" % (err_type, err_message)
|
return "%s: %s" % (err_type, err_message)
|
||||||
|
|
||||||
|
|
||||||
python_lib_dirs = [path for path in sys.path if path.endswith("/site-packages") or path.endswith("/dist-packages")]
|
python_lib_dirs = [path.replace("\\", "/") for path in sys.path if re.sub(r".*[\\/]", "", path) in ("site-packages", "dist-packages")]
|
||||||
python_lib_dirs.append(os.path.dirname(os.__file__)) # TODO: check if returns the correct path for PyPy
|
python_lib_dirs.append(os.path.dirname(os.__file__).replace("\\", "/")) # TODO: check if returns the correct path for PyPy
|
||||||
|
|
||||||
root_dir = os.path.realpath(__file__)
|
root_dir = os.path.realpath(os.path.dirname(__file__) + "/../../")
|
||||||
for _ in range(3):
|
root_dir = root_dir.replace("\\", "/")
|
||||||
root_dir = os.path.dirname(root_dir)
|
|
||||||
|
|
||||||
|
|
||||||
def formatTraceback(items, limit=None, fold_builtin=True):
|
def formatTraceback(items, limit=None, fold_builtin=True):
|
||||||
|
|
Loading…
Reference in a new issue