diff options
author | Bastien Nocera <hadess@hadess.net> | 2019-11-15 17:34:55 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2019-11-15 18:04:15 +0100 |
commit | fa2d1f78a4ad68c4756b55cb529fffbe800b17da (patch) | |
tree | 69ae6c1cb5183b44c20f6007c2a98b427e923e54 | |
parent | 0e126428dd36bbd43dde96609880506236bb2f66 (diff) |
web-export: Better error message on 404
-rwxr-xr-x | web-export/update.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/web-export/update.py b/web-export/update.py index 75a3bf3..ffac32d 100755 --- a/web-export/update.py +++ b/web-export/update.py @@ -142,7 +142,11 @@ class VcsObject: fd.close() else: url = self.get_url() - fd = urllib.request.urlopen(url, None) + try: + fd = urllib.request.urlopen(url, None) + except: + print("Failed to fetch URL: %s" % url) + raise self.data = fd.read() fd.close() |