"""
Dump bookmarks db to a more readable FLAD after check_urls
- Written by BroytMann, Apr 2000 - Aug 2004. Copyright (C) 2000-2004 PhiloSoft Design
+ Written by BroytMann. Copyright (C) 2000-2007 PhiloSoft Design.
"""
def strftime(s):
try:
return time.strftime("%a %d %b %Y %T", time.localtime(int(s)))
- except ValueError: # s is already formatted
+ except (TypeError, ValueError): # s is None or is already formatted
return s
Folder: %s
AddDate: %s
Comment: %s
-""" % (level, f.name, strftime(f.add_date), f.comment))
+LastModified: %s
+""" % (level, f.name, strftime(f.add_date), f.comment, f.last_modified or ''))
def bookmark(self, b, level):
for attr_name, attr_out in (("error", "Error"), ("no_error", "NoError"),
("moved", "Moved"), ("size", "Size"), ("md5", "Md5"),
- ("real_title", "RealTitle"), ("test_time", "TestTime")):
+ ("real_title", "RealTitle"), ("test_time", "TestTime"),
+ ("icon", "Icon"), ("charset", "Charset")):
if hasattr(b, attr_name):
self.outfile.write("\n%s: %s" % (attr_out, getattr(b, attr_name)))