From bca60d510f98fe13d6da1e5db142fb0d6d1f0713 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Mon, 23 Mar 2020 09:48:32 +0100 Subject: [PATCH] remove colons from filename to avoid conflicts with windows filesystem --- edit_data_form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit_data_form.py b/edit_data_form.py index 2c7af8f..219d85f 100755 --- a/edit_data_form.py +++ b/edit_data_form.py @@ -46,7 +46,7 @@ class FormApp(npyscreen.NPSAppManaged): def get_filepath(self): name = self.base_data.get_form_values_dict()['fullname'] date = datetime.datetime.now().replace(microsecond=0).isoformat() - fn = '{}_{}.json'.format('_'.join(name.lower().split()), date) + fn = '{}_{}.json'.format('_'.join(name.lower().split()), date.replace(':','')) file_path = pathlib.Path(self.dir_path, fn) return file_path