Skip to content

Commit ae4730c

Browse files
committed
process_tracker_python-60 Settings Manager should not try to create config file outright
🐛 disabled config file creation when environment is cloud based. Hit bug when importing process_tracker in lambda where the SettingsManager could not write since the directory structure is read only. Will create a build and test. Closes #60
1 parent d1beb52 commit ae4730c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

process_tracker/utilities/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def __init__(self, config_location=None):
2525
self.aws_utils = AwsUtilities()
2626

2727
exists = False
28+
cloud = False
2829

2930
if config_location is None:
3031
home = Path.home()
@@ -62,14 +63,13 @@ def __init__(self, config_location=None):
6263
if self.aws_utils.determine_valid_s3_path(
6364
path=self.config_path
6465
) and self.aws_utils.determine_s3_file_exists(path=self.config_file):
65-
66+
cloud = True
6667
exists = True
6768

6869
if exists:
6970
self.read_config_file()
70-
else:
71-
# How to handle if exists is false and it's s3?
7271

72+
elif not cloud:
7373
self.create_config_file()
7474

7575
def create_config_file(self):

0 commit comments

Comments
 (0)