diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/nbblib/bs.py | 6 | ||||
-rw-r--r-- | src/nbblib/main.py | 6 | ||||
-rw-r--r-- | src/nbblib/vcs.py | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/nbblib/bs.py b/src/nbblib/bs.py index aff1834..ac09b97 100644 --- a/src/nbblib/bs.py +++ b/src/nbblib/bs.py @@ -4,6 +4,8 @@ import os +import logging + from nbblib.plugins import * from nbblib.progutils import * @@ -44,13 +46,13 @@ class BSSourceTree(object): """Find BS tree type and return it""" if len(cls.plugins) < 1: raise NoPluginsRegistered(cls) - # print "CLASS", cls + logging.debug("CLASS %s", cls) matches = PluginDict() for key, klass in cls.plugins.iteritems(): try: t = klass(vcs_tree, context) if t.tree_root() == vcs_tree.tree_root(): - # print "KLASS", klass + logging.debug("KLASS %s", klass) matches[key] = t except NotABSSourceTree, e: pass diff --git a/src/nbblib/main.py b/src/nbblib/main.py index e9b20cd..2d432e4 100644 --- a/src/nbblib/main.py +++ b/src/nbblib/main.py @@ -113,6 +113,9 @@ Global options: """ +import logging + + from nbblib.bs import * from nbblib.commands import * from nbblib.package import * @@ -263,7 +266,8 @@ def main(argv): def cmdmain(argv): try: main(argv) + logging.shutdown() except CommandLineError, e: + logging.shutdown() print e sys.exit(2) - diff --git a/src/nbblib/vcs.py b/src/nbblib/vcs.py index 38d04b5..91c36c5 100644 --- a/src/nbblib/vcs.py +++ b/src/nbblib/vcs.py @@ -1,7 +1,7 @@ import os +import logging import urlparse - from nbblib.package import * from nbblib.plugins import * from nbblib.progutils import * @@ -74,13 +74,13 @@ class VCSourceTree(object): """Detect VCS tree type and return object representing it""" if len(cls.plugins) < 1: raise NoPluginsRegistered(cls) - # print "CLASS", cls + logging.debug("CLASS %s", cls) matches = PluginDict() for key, klass in cls.plugins.iteritems(): try: t = klass(srcdir, context) if t.tree_root() == srcdir: - # print "KLASS", klass + logging.debug("KLASS %s", klass) matches[key] = t except NotAVCSourceTree, e: pass |