Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/386042 )

Change subject: Flake8 - do not use bare except
......................................................................

Flake8 - do not use bare except

Change-Id: Iff3a8de77fc1a989d97175fc90861fa0bf5729c6
---
M FundraiserStatisticsGen/fundstatgen.py
M SquidRipper/squidder.py
M audit/paypal/ppreport.py
M sftp/client.py
M silverpop_export/upload.py
5 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/42/386042/1

diff --git a/FundraiserStatisticsGen/fundstatgen.py 
b/FundraiserStatisticsGen/fundstatgen.py
index 06528cf..b14fb74 100644
--- a/FundraiserStatisticsGen/fundstatgen.py
+++ b/FundraiserStatisticsGen/fundstatgen.py
@@ -275,7 +275,7 @@
 
     try:
         logging.captureWarnings(True)
-    except:
+    except Exception:
         # Damn; python 2.6; just ignore it
         pass
 
diff --git a/SquidRipper/squidder.py b/SquidRipper/squidder.py
index df5114a..9f23679 100644
--- a/SquidRipper/squidder.py
+++ b/SquidRipper/squidder.py
@@ -89,7 +89,7 @@
         try:
             obj = eval(line)
             hosts.append(obj['host'])
-        except:
+        except Exception:
             pass
 
     return hosts
@@ -106,7 +106,7 @@
             resultStr = result.read()[31:-3]
             jobj = json.loads(resultStr)
             contents.append(jobj['bannerName'])
-        except:
+        except Exception:
             contents.append(None)
     return contents
 
diff --git a/audit/paypal/ppreport.py b/audit/paypal/ppreport.py
index 334c7e3..774ee23 100644
--- a/audit/paypal/ppreport.py
+++ b/audit/paypal/ppreport.py
@@ -45,7 +45,7 @@
                 record = dict(zip(column_headers, row))
                 try:
                     callback(record)
-                except:
+                except Exception:
                     logme = {
                         'file': os.path.basename(path),
                         'row': rownum
diff --git a/sftp/client.py b/sftp/client.py
index c5d58eb..98c736a 100644
--- a/sftp/client.py
+++ b/sftp/client.py
@@ -39,7 +39,7 @@
     def get(self, filename, dest_path):
         try:
             self.client.get(filename, dest_path)
-        except:
+        except Exception:
             if os.path.exists(dest_path):
                 log.info("Removing corrupted download: 
{path}".format(path=dest_path))
                 os.unlink(dest_path)
diff --git a/silverpop_export/upload.py b/silverpop_export/upload.py
index 8ab7e27..c458225 100644
--- a/silverpop_export/upload.py
+++ b/silverpop_export/upload.py
@@ -41,7 +41,7 @@
         try:
             upload_most_recent()
             break
-        except:
+        except Exception:
             log.error("Ran into trouble: " + str(sys.exc_info()))
 
             if i == 2:

-- 
To view, visit https://gerrit.wikimedia.org/r/386042
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff3a8de77fc1a989d97175fc90861fa0bf5729c6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg <ej...@ejegg.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to