[devscripts] 01/02: debdiff-apply: avoid using Python bare exceptions, to appease falke8's E722.

Mattia Rizzolo mattia at debian.org
Fri Dec 29 18:29:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository devscripts.

commit a14ad520f46264f7effdede15b1efff5aadcd20f
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Fri Dec 29 19:12:43 2017 +0100

    debdiff-apply: avoid using Python bare exceptions, to appease falke8's E722.
    
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 debian/changelog      | 9 +++++++--
 scripts/debdiff-apply | 4 ++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index f906589..23c26a1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,8 +33,13 @@ devscripts (2.17.12) UNRELEASED; urgency=medium
       gzip (`Content-Encoding: gzip`)
 
   [ Christoph Berg ]
-  * debcheckout: Support salsa.debian.org.
-  * debcheckout: Set "git" as default repository type so https:// URLs use it.
+  * debcheckout:
+    + Support salsa.debian.org.
+    + Set "git" as default repository type so https:// URLs use it.
+
+  [ Mattia Rizzolo ]
+  * debdiff-apply:
+    + Avoid using Python bare exception, to appease flake8's E722.
 
  -- Mattia Rizzolo <mattia at debian.org>  Mon, 30 Oct 2017 07:48:10 +0100
 
diff --git a/scripts/debdiff-apply b/scripts/debdiff-apply
index 8381436..1f7b0e8 100755
--- a/scripts/debdiff-apply
+++ b/scripts/debdiff-apply
@@ -102,7 +102,7 @@ def apply_dch_patch(source_file, current, patch_name, old_version, target, dry_r
         with open(source_file + ".new", "w") as fp:
             current.write_to_open_file(fp)
         os.rename(source_file + ".new", source_file)
-    except:
+    except Exception:
         logging.warn("failed to patch %s", source_file)
         logging.warn("half-applied changes in %s", source_file + ".new")
         logging.warn("current working directory is %s", os.getcwd())
@@ -261,7 +261,7 @@ def main(args):
         try:
             patch = unidiff.PatchSet(data.splitlines(keepends=True), encoding=enc)
             break
-        except:
+        except Exception:
             if enc == TRY_ENCODINGS[-1]:
                 raise
             else:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list