aboutsummaryrefslogtreecommitdiffstats
path: root/becommands/set_root.py
diff options
context:
space:
mode:
authorAaron Bentley <abentley@panoramicfeedback.com>2005-05-18 20:48:58 +0000
committerAaron Bentley <abentley@panoramicfeedback.com>2005-05-18 20:48:58 +0000
commit55e3933f494155ef9814b9135c93ffaa625e7bde (patch)
treec2ba77b5a70c66645de1ef2bd6d3ecc7ce01268d /becommands/set_root.py
parent4910cf78aee314c76c62b7cba19ab36456545e4e (diff)
downloadbugseverywhere-55e3933f494155ef9814b9135c93ffaa625e7bde.tar.gz
Prevented RCS name being displayed when erroring
Diffstat (limited to 'becommands/set_root.py')
-rw-r--r--becommands/set_root.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/becommands/set_root.py b/becommands/set_root.py
index df60721..2ae7e1a 100644
--- a/becommands/set_root.py
+++ b/becommands/set_root.py
@@ -42,8 +42,7 @@ def execute(args):
>>> try:
... execute(['.'])
... except cmdutil.UserError, e:
- ... str(e).startswith("Directory already initialized ")
- Using Arch for revision control.
+ ... str(e).startswith("Directory already initialized: ")
True
>>> tests.clean_up()
>>> execute(['/highly-unlikely-to-exist'])
@@ -54,16 +53,16 @@ def execute(args):
if len(args) != 1:
raise cmdutil.UsageError
dir_rcs = rcs.detect(args[0])
- if dir_rcs.name is not "None":
- print "Using %s for revision control." % dir_rcs.name
- else:
- print "No revision control detected."
try:
bugdir.create_bug_dir(args[0], dir_rcs)
except bugdir.NoRootEntry:
raise cmdutil.UserError("No such directory: %s" % args[0])
except bugdir.AlreadyInitialized:
raise cmdutil.UserError("Directory already initialized: %s" % args[0])
+ if dir_rcs.name is not "None":
+ print "Using %s for revision control." % dir_rcs.name
+ else:
+ print "No revision control detected."
print "Directory initialized."
def get_parser():