From: Petr Vorel Date: Fri, 15 Jun 2018 13:52:41 +0000 (+0200) Subject: pwclient/get: Add suffix to created patch X-Git-Tag: v2.1.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53561a1e674466e6650ff2e1c7dfeaaca4879fc2;p=thirdparty%2Fpatchwork.git pwclient/get: Add suffix to created patch Signed-off-by: Petr Vorel Reviewed-by: Stephen Finucane --- diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index 29cad896..79137b0d 100755 --- a/patchwork/bin/pwclient +++ b/patchwork/bin/pwclient @@ -305,9 +305,10 @@ def action_get(rpc, patch_id): sys.exit(1) base_fname = fname = os.path.basename(patch['filename']) + fname += '.patch' i = 0 while os.path.exists(fname): - fname = "%s.%d" % (base_fname, i) + fname = "%s.%d.patch" % (base_fname, i) i += 1 with io.open(fname, 'w', encoding='utf-8') as f: diff --git a/releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml b/releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml new file mode 100644 index 00000000..8e6d68f2 --- /dev/null +++ b/releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``pwclient get`` command will now download patches with a ``.patch`` + extension.