Change timestamp placement (now after related string, and indented. Added retrieval info for comparison URLs
- Legacy-Id: 454
This commit is contained in:
parent
a8f8ace37c
commit
54f5456c25
|
@ -98,8 +98,8 @@ def note(string):
|
||||||
global prev_note_time
|
global prev_note_time
|
||||||
"""Like a print function, but adds a leading timestamp line"""
|
"""Like a print function, but adds a leading timestamp line"""
|
||||||
now = datetime.utcnow()
|
now = datetime.utcnow()
|
||||||
print "Time", now.strftime("%Y-%m-%d_%H:%M"), "+%ds" % (now-prev_note_time).seconds
|
|
||||||
print string
|
print string
|
||||||
|
print now.strftime(" %Y-%m-%d_%H:%M"), "+%ds" % (now-prev_note_time).seconds
|
||||||
prev_note_time = datetime.utcnow()
|
prev_note_time = datetime.utcnow()
|
||||||
|
|
||||||
class UrlTestCase(TestCase):
|
class UrlTestCase(TestCase):
|
||||||
|
@ -235,10 +235,11 @@ class UrlTestCase(TestCase):
|
||||||
#print "Fetching", master, "...",
|
#print "Fetching", master, "...",
|
||||||
mfile = urllib.urlopen(master)
|
mfile = urllib.urlopen(master)
|
||||||
goodhtml = mfile.read()
|
goodhtml = mfile.read()
|
||||||
except urllib.URLError, e:
|
|
||||||
note("Failed retrieving master text for comparison: %s" % e)
|
|
||||||
try:
|
|
||||||
mfile.close()
|
mfile.close()
|
||||||
|
note(" 200 %s" % (master))
|
||||||
|
except urllib.URLError, e:
|
||||||
|
note(" %s %s" % (e.code, e.url))
|
||||||
|
try:
|
||||||
if goodhtml and response.content:
|
if goodhtml and response.content:
|
||||||
if "sort" in codes:
|
if "sort" in codes:
|
||||||
def sorted(l):
|
def sorted(l):
|
||||||
|
|
Loading…
Reference in a new issue