Created
October 16, 2014 12:34
-
-
Save pferreir/613bb4ad191f7fd68767 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/bin/ai-dump 2014-09-09 15:22:08.000000000 +0200 | |
+++ ai-dump 2014-10-16 14:29:53.000000001 +0200 | |
@@ -46,17 +46,15 @@ | |
url = roger.state_url(host) | |
try: | |
- answer = roger.open_url(url) | |
+ return roger.open_url(url) | |
except urllib2.HTTPError, e: | |
if e.code == 401: | |
sys.stderr.write("Not authorized to view '%s' in Roger" % host) | |
sys.exit(3) | |
- elif e.code == 404: | |
- return None | |
except urllib2.URLError, e: | |
sys.stderr.write("Cannot open url '%s' for Roger: '%s'" % (url, e)) | |
sys.exit(3) | |
- return answer | |
+ return None | |
def host_main(pargs): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment