aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Kahle <tomka@gentoo.org>2012-03-07 12:10:17 +0100
committerThomas Kahle <tomka@gentoo.org>2012-03-07 12:10:17 +0100
commit135e153016535273dcd65d02bf03316355630cfb (patch)
tree177aef0c7b1b5c6806977a4cab893717693e28a3 /scripts
parentCheck if the given bugnumber is an integer (diff)
downloadtatt-135e153016535273dcd65d02bf03316355630cfb.tar.gz
tatt-135e153016535273dcd65d02bf03316355630cfb.tar.bz2
tatt-135e153016535273dcd65d02bf03316355630cfb.zip
Fix -r option without -b
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/tatt6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/tatt b/scripts/tatt
index bba5bde..d8206c2 100755
--- a/scripts/tatt
+++ b/scripts/tatt
@@ -87,13 +87,15 @@ parser.add_option("-o", "--overview" "--browse",
config['verbose']=options.verbose
# Normalize the template dir:
config['template-dir']=os.path.abspath(config['template-dir'])+os.sep
-# Test if the bugnumber represents an int
+# If given, test if the bugnumber represents an int
try:
int(options.bugnum)
except ValueError:
print ("The bugnumber you gave with -b should be an integer.")
exit(1);
-
+except TypeError:
+ # This occurs if bugnum is None, that is, -b was not given
+ pass
## Checking for root, tatt should be run as a user, I guess.
## Remove on occasion.