Mercurial > repo
changeset 1814:28b402caecb0
<oerjan> cat url.1 >bin/url
author | HackBot |
---|---|
date | Fri, 25 Jan 2013 20:38:17 +0000 |
parents | d5b2eb52c760 |
children | 24a919a1a974 |
files | bin/url |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/url Fri Jan 25 20:38:02 2013 +0000 +++ b/bin/url Fri Jan 25 20:38:17 2013 +0000 @@ -1,6 +1,8 @@ #!/usr/bin/env python import sys, urllib -arg = sys.argv(1) -if arg == None: print "http://codu.org/projects/hackbot/fshg/" -else: print urllib.quote( - "http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/" . arg) +if len(sys.argv) <= 1: + print "http://codu.org/projects/hackbot/fshg/" +else: + print urllib.quote( + "http://codu.org/projects/hackbot/fshg/index.cgi/raw-file/tip/" + + sys.argv[1])