--- a/WebBrowser/Bookmarks/BookmarksImporters/ChromeImporter.py Sat Mar 11 18:08:42 2017 +0100 +++ b/WebBrowser/Bookmarks/BookmarksImporters/ChromeImporter.py Sat Mar 11 19:17:59 2017 +0100 @@ -20,18 +20,18 @@ import Globals -def getImporterInfo(id): +def getImporterInfo(sourceId): """ Module function to get information for the given source id. - @param id id of the browser ("chrome" or "chromium") + @param sourceId id of the browser ("chrome" or "chromium") @return tuple with an icon (QPixmap), readable name (string), name of the default bookmarks file (string), an info text (string), a prompt (string) and the default directory of the bookmarks file (string) @exception ValueError raised to indicate an invalid browser ID """ - if id == "chrome": + if sourceId == "chrome": if Globals.isWindowsPlatform(): standardDir = os.path.expandvars( "%USERPROFILE%\\AppData\\Local\\Google\\Chrome\\" @@ -55,7 +55,7 @@ """Please choose the file to begin importing bookmarks."""), standardDir, ) - elif id == "chromium": + elif sourceId == "chromium": if Globals.isWindowsPlatform(): standardDir = os.path.expandvars( "%USERPROFILE%\\AppData\\Local\\Google\\Chrome\\" @@ -76,21 +76,22 @@ standardDir, ) else: - raise ValueError("Unsupported browser ID given ({0}).".format(id)) + raise ValueError( + "Unsupported browser ID given ({0}).".format(sourceId)) class ChromeImporter(BookmarksImporter): """ Class implementing the Chrome bookmarks importer. """ - def __init__(self, id="", parent=None): + def __init__(self, sourceId="", parent=None): """ Constructor - @param id source ID (string) + @param sourceId source ID (string) @param parent reference to the parent object (QObject) """ - super(ChromeImporter, self).__init__(id, parent) + super(ChromeImporter, self).__init__(sourceId, parent) self.__fileName = ""