Fixed some pyflakes warnings detected by the upgraded version.

Wed, 20 Jun 2018 18:48:44 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 20 Jun 2018 18:48:44 +0200
changeset 6360
73033fa6a99c
parent 6359
e78be0616e6e
child 6361
53f6bd7fb238

Fixed some pyflakes warnings detected by the upgraded version.

PluginManager/PluginManager.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsPySvn/subversion.py file | annotate | diff | comparison | revisions
Utilities/binplistlib.py file | annotate | diff | comparison | revisions
WebBrowser/GreaseMonkey/GreaseMonkeyDownloader.py file | annotate | diff | comparison | revisions
install.py file | annotate | diff | comparison | revisions
--- a/PluginManager/PluginManager.py	Wed Jun 20 18:45:07 2018 +0200
+++ b/PluginManager/PluginManager.py	Wed Jun 20 18:48:44 2018 +0200
@@ -1138,7 +1138,7 @@
         if not os.path.exists(downloadDir):
             try:
                 os.mkdir(downloadDir, 0o755)
-            except (OSError, IOError) as err:
+            except (OSError, IOError):
                 # try again with (possibly) new default
                 downloadDir = self.__defaultDownloadDir
                 if not os.path.exists(downloadDir):
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py	Wed Jun 20 18:45:07 2018 +0200
+++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py	Wed Jun 20 18:48:44 2018 +0200
@@ -284,7 +284,7 @@
                     projectDir, os.path.join(tmpDir, project, 'trunk'))
             else:
                 shutil.copytree(projectDir, os.path.join(tmpDir, project))
-        except OSError as e:
+        except OSError:
             if os.path.isdir(tmpDir):
                 shutil.rmtree(tmpDir, True)
             return False, False
--- a/Utilities/binplistlib.py	Wed Jun 20 18:45:07 2018 +0200
+++ b/Utilities/binplistlib.py	Wed Jun 20 18:48:44 2018 +0200
@@ -161,7 +161,7 @@
     try:
         reader = PlistReader(pathOrFile)
         result = reader.parse()
-    except NotBinaryPlistException as e:
+    except NotBinaryPlistException:
         try:
             pathOrFile.seek(0)
             result = plistlib.readPlist(pathOrFile)
--- a/WebBrowser/GreaseMonkey/GreaseMonkeyDownloader.py	Wed Jun 20 18:45:07 2018 +0200
+++ b/WebBrowser/GreaseMonkey/GreaseMonkeyDownloader.py	Wed Jun 20 18:48:44 2018 +0200
@@ -91,7 +91,7 @@
         
         try:
             f = open(self.__fileName, "w", encoding="utf-8")
-        except (IOError, OSError) as err:
+        except (IOError, OSError):
             self.error.emit()
             return
         f.write(response)
@@ -145,7 +145,7 @@
         
         try:
             f = open(self.__fileName, "w", encoding="utf-8")
-        except (IOError, OSError) as err:
+        except (IOError, OSError):
             self.error.emit()
             return
         f.write(response)
--- a/install.py	Wed Jun 20 18:45:07 2018 +0200
+++ b/install.py	Wed Jun 20 18:48:44 2018 +0200
@@ -1275,7 +1275,7 @@
     
     try:
         import xml.etree            # __IGNORE_WARNING__
-    except ImportError as msg:
+    except ImportError:
         print('Your Python installation is missing the XML module.')
         print('Please install it and try again.')
         exit(5)

eric ide

mercurial