diff options
author | Petr Vorel <petr.vorel@gmail.com> | 2018-06-15 15:52:41 +0200 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2018-06-18 17:43:20 +0100 |
commit | 53561a1e674466e6650ff2e1c7dfeaaca4879fc2 (patch) | |
tree | 14ca40d39db236aca040e2b73d6a1a895faae2d9 | |
parent | 9c179bf4ce968f87b1e960063f4a6dbb9cfae0f9 (diff) | |
download | patchwork-53561a1e674466e6650ff2e1c7dfeaaca4879fc2.tar patchwork-53561a1e674466e6650ff2e1c7dfeaaca4879fc2.tar.gz |
pwclient/get: Add suffix to created patch
Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
-rwxr-xr-x | patchwork/bin/pwclient | 3 | ||||
-rw-r--r-- | releasenotes/notes/pwclient-patch-extension-d864c3c340fbd670.yaml | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/patchwork/bin/pwclient b/patchwork/bin/pwclient index 29cad89..79137b0 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 0000000..8e6d68f --- /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. |