diff --git a/src/classes/ConfigManager.py b/src/classes/ConfigManager.py index 0be7ca3..8d87e44 100644 --- a/src/classes/ConfigManager.py +++ b/src/classes/ConfigManager.py @@ -57,8 +57,8 @@ def setConfig(self, parser, default=False, showFileCreatedText=True): str(self.consolidationPercentage)) parser.set('config', 'shuffle', 'y') parser.set('config', 'cacheStockData', 'y') - parser.set('config', 'onlyStageTwoStocks', 'y') - parser.set('config', 'useEMA', 'n') + parser.set('config', 'onlyStageTwoStocks', 'y' if self.stageTwo else 'n') + parser.set('config', 'useEMA', 'y' if self.useEMA else 'n') try: fp = open('screenipy.ini', 'w') parser.write(fp) @@ -157,8 +157,12 @@ def getConfig(self, parser): self.cacheEnabled = True if 'n' not in str(parser.get('config', 'onlyStageTwoStocks')).lower(): self.stageTwo = True + else: + self.stageTwo = False if 'y' not in str(parser.get('config', 'useEMA')).lower(): self.useEMA = False + else: + self.useEMA = True except configparser.NoOptionError: input(colorText.BOLD + colorText.FAIL + '[+] Screenipy requires user configuration again. Press enter to continue..' + colorText.END)