Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TurtleArt/talogo.py
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-12-04 00:18:06 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-12-04 00:18:06 (GMT)
commit54d650047ae80f0730227e65eb6bc439b7934365 (patch)
tree438de460c0ee680cc2522a7f8156b6a17ce35aa2 /TurtleArt/talogo.py
parentcfdf61e26893d1ecdd09cd98c04ee4ffe31f0bdd (diff)
more tweaks to get URL, including new status block
Diffstat (limited to 'TurtleArt/talogo.py')
-rw-r--r--TurtleArt/talogo.py9
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