bugfix
This commit is contained in:
parent
433793afab
commit
274cc21040
|
@ -1,7 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
import urllib2, sys
|
||||
|
||||
pages=["https://csclub.uwaterloo.ca", "http://mirror.csclub.uwaterloo.ca"]
|
||||
pages=["https://csclub.uwaterloo.ca",
|
||||
"http://mirror.csclub.uwaterloo.ca"]
|
||||
|
||||
for page in pages:
|
||||
try:
|
||||
|
@ -13,9 +14,10 @@ for page in pages:
|
|||
if not"Computer Science Club" in page:
|
||||
print "FAIL, homepage doesn't mention Computer Science Club"
|
||||
sys.exit(3)
|
||||
# So read() didn't throw an exception, nor did opening,
|
||||
# and we have enough data, so likely good.
|
||||
sys.exit(0)
|
||||
except urllib2.URLError as e:
|
||||
print "FAIL, exception ", e
|
||||
sys.exit(1)
|
||||
|
||||
# So read() didn't throw an exception, nor did opening,
|
||||
# and we have enough data, so likely good.
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Reference in New Issue