projects
/
irker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
367ce3e
)
Fix the test for retrieval error.
author
Eric S. Raymond
<esr@thyrsus.com>
Mon, 1 Oct 2012 04:04:39 +0000
(
00:04
-0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Mon, 1 Oct 2012 04:04:39 +0000
(
00:04
-0400)
irkerhook.py
patch
|
blob
|
history
diff --git
a/irkerhook.py
b/irkerhook.py
index 62c13d59a3af02c13416cbba5b827768538d73e3..d12dcdba4df87ec3d71b170d9ff17be0689118ce 100755
(executable)
--- a/
irkerhook.py
+++ b/
irkerhook.py
@@
-138,8
+138,7
@@
class GenericExtractor:
prefix = self.urlprefix % self.__dict__
try:
webview = prefix + self.commit
- txt = open(urllib.urlretrieve(webview)[0]).read()
- if "404" in txt or "not found" in txt:
+ if urllib.urlopen(webview).getcode() == 404:
raise IOError
try:
# Didn't get a retrieval error or 404 on the web