3
0
mirror of https://git.launchpad.net/ubuntu-dev-tools synced 2025-03-13 16:11:15 +00:00

* hugdaylist: Added code to handle exceptions.

This commit is contained in:
Jonathan Patrick Davies 2008-08-10 15:49:02 +01:00
parent f45d1724c7
commit e3afe4de77
2 changed files with 12 additions and 5 deletions

1
debian/changelog vendored

@ -7,6 +7,7 @@ ubuntu-dev-tools (0.36ubuntu1) intrepid; urgency=low
- grab-attachment.1. - grab-attachment.1.
* doc/requestsync.1: Described variables used by requestsync in man * doc/requestsync.1: Described variables used by requestsync in man
page. (LP: #237595) page. (LP: #237595)
* hugdaylist: Added code to handle exceptions.
[ Siegfried-Angel Gevatter Pujals ] [ Siegfried-Angel Gevatter Pujals ]
* Change the versioning scheme from 0.XX to 0.XXubuntu1. Delete * Change the versioning scheme from 0.XX to 0.XXubuntu1. Delete

@ -21,9 +21,9 @@ try:
import launchpadbugs.connector as Connector import launchpadbugs.connector as Connector
BugList = Connector.ConnectBugList() BugList = Connector.ConnectBugList()
Bug = Connector.ConnectBug(method="Text") Bug = Connector.ConnectBug(method="Text")
except: except ImportError:
print >> sys.stderr, \ print >> sys.stderr, \
"You need python-launchpad-bugs (>= 0.2.25) installed to use hugdaylist." "You need python-launchpad-bugs (>= 0.2.25) installed to use hugdaylist."
sys.exit(1) sys.exit(1)
@ -38,7 +38,10 @@ def check_args():
sys.exit(1) sys.exit(1)
if sys.argv[1] == "-n": if sys.argv[1] == "-n":
howmany = int(sys.argv[2]) try:
howmany = int(sys.argv[2])
except IndexError:
print "Option '-n' requires a number."
if len(sys.argv) < 4: if len(sys.argv) < 4:
print USAGE print USAGE
sys.exit(1) sys.exit(1)
@ -82,5 +85,8 @@ def main():
if __name__ == '__main__': if __name__ == '__main__':
main() try:
main()
except KeyboardInterrupt:
print >> sys.stderr, "Aborted"
sys.exit(1)