aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-06-01 22:42:10 +0200
committerGuido Günther <agx@sigxcpu.org>2015-06-02 09:26:00 +0200
commit58ea0677d6ef0ea0dfc5bc93c0517967db49c656 (patch)
treee5bfc5b28cb0407452d1ae5a77351acb4e7aa516
parent32c52b7f8687570c2eb5c97c2fe6f17935c72727 (diff)
Use python3 compatible exception syntax
-rwxr-xr-xgbp/scripts/pq.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/pq.py b/gbp/scripts/pq.py
index 4145648c..d3c452c1 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -179,9 +179,9 @@ def export_patches(repo, branch, options):
pq_branch = pq_branch_name(branch)
try:
shutil.rmtree(PATCH_DIR)
- except OSError as (e, msg):
- if e != errno.ENOENT:
- raise GbpError("Failed to remove patch dir: %s" % msg)
+ except OSError as e:
+ if e.errno != errno.ENOENT:
+ raise GbpError("Failed to remove patch dir: %s" % e.strerror)
else:
gbp.log.debug("%s does not exist." % PATCH_DIR)