[PATCH 1/1] pwclient/get: Add suffix to created patch
Petr Vorel
petr.vorel at gmail.com
Fri Jun 15 23:52:41 AEST 2018
Signed-off-by: Petr Vorel <petr.vorel at gmail.com>
---
I like automatic syntax highlight, which requires suffix.
---
patchwork/bin/pwclient | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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:
--
2.17.1
More information about the Patchwork
mailing list