From 8d21936fb5f92f0c35cfe53a4cfd6c1f6190fcde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Vinot?= Date: Mon, 2 Nov 2015 17:59:32 +0100 Subject: [PATCH] Add function to force the extension of the copied file --- kittengroomer/helpers.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/kittengroomer/helpers.py b/kittengroomer/helpers.py index 5f9e5ae..5d2997f 100644 --- a/kittengroomer/helpers.py +++ b/kittengroomer/helpers.py @@ -79,6 +79,11 @@ class FileBase(object): path, filename = os.path.split(self.dst_path) self.dst_path = os.path.join(path, '{}.bin'.format(filename)) + def force_ext(self, ext): + if not self.dst_path.endswith(ext): + self.log_details['force_ext'] = True + self.dst_path += ext + class KittenGroomerBase(object):