Skip to content

Commit 54f5456

Browse files
committed
Change timestamp placement (now after related string, and indented. Added retrieval info for comparison URLs
- Legacy-Id: 454
1 parent a8f8ace commit 54f5456

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

ietf/tests.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def note(string):
9898
global prev_note_time
9999
"""Like a print function, but adds a leading timestamp line"""
100100
now = datetime.utcnow()
101-
print "Time", now.strftime("%Y-%m-%d_%H:%M"), "+%ds" % (now-prev_note_time).seconds
102101
print string
102+
print now.strftime(" %Y-%m-%d_%H:%M"), "+%ds" % (now-prev_note_time).seconds
103103
prev_note_time = datetime.utcnow()
104104

105105
class UrlTestCase(TestCase):
@@ -235,10 +235,11 @@ def doUrlsTest(self, lst):
235235
#print "Fetching", master, "...",
236236
mfile = urllib.urlopen(master)
237237
goodhtml = mfile.read()
238+
mfile.close()
239+
note(" 200 %s" % (master))
238240
except urllib.URLError, e:
239-
note("Failed retrieving master text for comparison: %s" % e)
241+
note(" %s %s" % (e.code, e.url))
240242
try:
241-
mfile.close()
242243
if goodhtml and response.content:
243244
if "sort" in codes:
244245
def sorted(l):

0 commit comments

Comments
 (0)