--- a/Helpviewer/Bookmarks/NsHtmlWriter.py Tue Oct 15 22:03:54 2013 +0200 +++ b/Helpviewer/Bookmarks/NsHtmlWriter.py Fri Oct 18 23:00:41 2013 +0200 @@ -18,7 +18,8 @@ class NsHtmlWriter(QObject): """ - Class implementing a writer object to generate Netscape HTML bookmark files. + Class implementing a writer object to generate Netscape HTML bookmark + files. """ indentSize = 4 @@ -35,6 +36,7 @@ @param fileNameOrDevice name of the file to write (string) or device to write to (QIODevice) @param root root node of the bookmark tree (BookmarkNode) + @return flag indicating success (boolean) """ if isinstance(fileNameOrDevice, QIODevice): f = fileNameOrDevice @@ -51,12 +53,14 @@ Private method to write an Netscape HTML bookmark file. @param root root node of the bookmark tree (BookmarkNode) + @return flag indicating success (boolean) """ self.__dev.write("<!DOCTYPE NETSCAPE-Bookmark-file-1>\n" "<!-- This is an automatically generated file.\n" " It will be read and overwritten.\n" " DO NOT EDIT! -->\n" - "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=UTF-8\">\n" + "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html;" + " charset=UTF-8\">\n" "<TITLE>Bookmarks</TITLE>\n" "<H1>Bookmarks</H1>\n" "\n" @@ -104,7 +108,8 @@ else: added = "" if node.modified.isValid(): - modified = " LAST_MODIFIED=\"{0}\"".format(node.modified.toTime_t()) + modified = " LAST_MODIFIED=\"{0}\"".format( + node.modified.toTime_t()) else: modified = "" if node.visited.isValid(): @@ -114,7 +119,8 @@ self.__dev.write(" " * indent) self.__dev.write("<DT><A HREF=\"{0}\"{1}{2}{3}>{4}</A>\n".format( - node.url, added, modified, visited, Utilities.html_uencode(node.title) + node.url, added, modified, visited, + Utilities.html_uencode(node.title) )) if node.desc: @@ -146,7 +152,8 @@ if node.desc: self.__dev.write(" " * indent) - self.__dev.write("<DD>{0}\n".format("".join(node.desc.splitlines()))) + self.__dev.write("<DD>{0}\n".format( + "".join(node.desc.splitlines()))) self.__dev.write(" " * indent) self.__dev.write("<DL><p>\n")