diff options
author | Walter Bender <walter@sugarlabs.org> | 2013-12-04 00:18:06 (GMT) |
---|---|---|
committer | Walter Bender <walter@sugarlabs.org> | 2013-12-04 00:18:06 (GMT) |
commit | 54d650047ae80f0730227e65eb6bc439b7934365 (patch) | |
tree | 438de460c0ee680cc2522a7f8156b6a17ce35aa2 /TurtleArt/talogo.py | |
parent | cfdf61e26893d1ecdd09cd98c04ee4ffe31f0bdd (diff) |
more tweaks to get URL, including new status block
Diffstat (limited to 'TurtleArt/talogo.py')
-rw-r--r-- | TurtleArt/talogo.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/TurtleArt/talogo.py b/TurtleArt/talogo.py index 11e98f7..7f4138c 100644 --- a/TurtleArt/talogo.py +++ b/TurtleArt/talogo.py @@ -1068,9 +1068,14 @@ class LogoCode: url = "http://" + url # assume HTTP try: req = urllib2.urlopen(url) - except urllib2.HTTPError: - debug_output("Couldn't open %s" % (url), self.tw.running_sugar) + except urllib2.HTTPError, e: + debug_output("Couldn't open %s: %s" % (url, e), + self.tw.running_sugar) raise logoerror(url) + except urllib2.URLError, e: + debug_output("Couldn't open %s: %s" % (url, e), + self.tw.running_sugar) + raise logoerror('#noconnection') if req.info().getheader("Content-Type")[0:5] == "image": # it can't be deleted immediately, or else we won't ever access it |