From 13880a3b88b2c3d7a933c491c230672e7171fbbb Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Sun, 22 Mar 2020 18:33:56 +0100 Subject: [PATCH] Use lowercase name for file paths --- edit_data_form.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edit_data_form.py b/edit_data_form.py index b158b23..03ac320 100755 --- a/edit_data_form.py +++ b/edit_data_form.py @@ -45,11 +45,11 @@ class FormApp(npyscreen.NPSAppManaged): def get_filepath(self): name = self.base_data.get_form_values_dict()['fullname'] - fn = '{}_{}.json'.format('_'.join(name.split()), datetime.datetime.now().replace(microsecond=0).isoformat()) + date = datetime.datetime.now().replace(microsecond=0).isoformat() + fn = '{}_{}.json'.format('_'.join(name.lower().split()), date) if self.is_new_member: print('Enter destination directory for new Member data:') self.dir_path = input() - file_path = pathlib.Path(self.dir_path, fn) return file_path