summaryrefslogtreecommitdiff
path: root/gbp/scripts/pq.py
diff options
context:
space:
mode:
authorbiao716.wang <biao716.wang@samsung.com>2022-11-25 22:24:26 +0900
committerbiao716.wang <biao716.wang@samsung.com>2022-11-28 21:21:23 +0900
commit6f7ef991f742eb5c5226272ca28edd71a2424143 (patch)
tree8dc1dda13dca3149b20cfdf77ed97e1732e56fe9 /gbp/scripts/pq.py
parent0ddd0409b7ba0e9cb3e5234a506041ff032c2e27 (diff)
downloadgit-buildpackage-6f7ef991f742eb5c5226272ca28edd71a2424143.tar.gz
git-buildpackage-6f7ef991f742eb5c5226272ca28edd71a2424143.tar.bz2
git-buildpackage-6f7ef991f742eb5c5226272ca28edd71a2424143.zip
porting code to python3.x with os patch
Change-Id: I3deda71d6bde7c3363800d79d2e9ae6998bdb9e7 Signed-off-by: biao716.wang <biao716.wang@samsung.com>
Diffstat (limited to 'gbp/scripts/pq.py')
-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 029e7182..4430d5fa 100755
--- a/gbp/scripts/pq.py
+++ b/gbp/scripts/pq.py
@@ -167,9 +167,9 @@ def export_patches(repo, branch, options):
pq_branch = pq_branch_name(branch, options)
try:
shutil.rmtree(PATCH_DIR)
- except OSError as msg:
- if msg.errno != 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)