}
-def get_error(msg):
- if isinstance(msg, str):
- return msg
+def get_error(e):
+ if isinstance(e, str):
+ return e
else:
s = []
- for i in msg:
+ for i in e:
s.append("'%s'" % str(i).replace('\n', "\\n"))
return "(%s)" % ' '.join(s)
bookmark.last_modified = last_modified
md5 = md5wrapper()
- if urllib._urlopener.type == "ftp": # Pass welcome message through MD5
+ if url_type == "ftp": # Pass welcome message through MD5
md5.update(self.get_ftp_welcome())
md5.update(content)
def finish_check_url(self, bookmark):
start = self.start
bookmark.last_tested = str(start)
-
now = int(time.time())
bookmark.test_time = str(now - start)
-
- self.cleanup()