]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_whtml.py
last_visit could be None.
[bookmarks_db.git] / Writers / bkmk_whtml.py
index 00591b04ac0d2c8018365b6a9da7a17223510372..8b3cd13ebfd53229608b6610b6e5936978348e12 100644 (file)
@@ -10,6 +10,9 @@ __author__ = "Oleg Broytman <phd@phdru.name>"
 __copyright__ = "Copyright (C) 2000-2011 PhiloSoft Design"
 __license__ = "GNU GPL"
 
+__all__ = ['writer_html']
+
+
 from bkmk_objects import Writer, BKMK_FORMAT, quote_title
 
 
@@ -45,7 +48,9 @@ class writer_html(Writer):
       self.outfile.write(ind_s*level + "</DL><p>\n")
 
    def bookmark(self, b, level):
-      self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s" LAST_VISIT="%s" LAST_MODIFIED="%s"' % (b.href, b.add_date, b.last_visit, b.last_modified))
+      self.outfile.write(ind_s*(level+1) + '<DT><A HREF="%s" ADD_DATE="%s"' % (b.href, b.add_date))
+      if b.last_visit: self.outfile.write('LAST_VISIT="%s"' % b.last_visit)
+      self.outfile.write('LAST_MODIFIED="%s"' % b.last_modified)
       if BKMK_FORMAT == "MOZILLA":
          if b.keyword: self.outfile.write(' SHORTCUTURL="%s"' % b.keyword)
          if b.icon_href: self.outfile.write(' ICON_URI="%s"' % b.icon_href)