summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Raghavan <ford_prefect@gentoo.org>2009-04-18 11:09:09 +0530
committerArun Raghavan <ford_prefect@gentoo.org>2009-04-18 11:09:09 +0530
commit12b59754f3128f395503da9ead55862a3398184c (patch)
tree493233b6b76ec8662f2072becc97a11f53316bf7
parentReleases max lag was wrong (should be 2 days) (diff)
downloadgard-12b59754f3128f395503da9ead55862a3398184c.tar.gz
gard-12b59754f3128f395503da9ead55862a3398184c.tar.bz2
gard-12b59754f3128f395503da9ead55862a3398184c.zip
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.
-rwxr-xr-xgard-v2.py4
1 files changed, 4 insertions, 0 deletions
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()