Add function to force the extension of the copied file

pull/2/head
Raphaël Vinot 2015-11-02 17:59:32 +01:00
parent af10e8f1ec
commit 8d21936fb5
1 changed files with 5 additions and 0 deletions

View File

@ -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):