From 12b59754f3128f395503da9ead55862a3398184c Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Sat, 18 Apr 2009 11:09:09 +0530 Subject: Allow passing in a single bug to check on the command line This is just a simple argv[] check right now. Can switch to getopt when there's more than one argument to be passed. --- gard-v2.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gard-v2.py b/gard-v2.py index 3d36cb9..8eaf48d 100755 --- a/gard-v2.py +++ b/gard-v2.py @@ -39,6 +39,10 @@ def add_handler(logfile): def remove_handler(handler): logging.getLogger('').removeHandler(handler) +# See if we got a specific bug number to check +if (len(sys.argv) == 2): + bugurl += "&bug_id=" + sys.argv[1] + # TODO: Add a timeout _ = urllib2.urlopen(bugurl) file = _.readlines() -- cgit v1.2.3-65-gdbad