This commit is contained in:
gregory 2025-03-13 12:01:05 -04:00
parent a45e28b9ca
commit 6268f2c908
2 changed files with 6 additions and 5 deletions

3
.gitignore vendored
View File

@ -1,3 +1,2 @@
.venv
tmp
output
tmp

View File

@ -19,12 +19,11 @@ GECKO_DRIVER = 'gecko'
CHROME_DRIVER = 'chrome'
DEFAULT_CONFIG_PATH = './config.ini'
DEFAULT_OUTPUT_PATH = './'
DEFAULT_WORKING_DIRECTORY = './tmp'
DEFAULT_APP_URL = 'https://app.flightschedulepro.com'
DEFAULT_TIMEOUT = 10 #seconds
DEFAULT_MAX_SESSIONS = 500
# HACK maybe Ubuntu specific
os.environ["TMPDIR"] = "./tmp"
parser = argparse.ArgumentParser(
prog='FSP Progress Combiner',
@ -43,7 +42,7 @@ args = parser.parse_args()
config = configparser.ConfigParser()
config.read(args.config)
working_dir = config['main']['working_directory']
working_dir = config['main'].get('working_directory', DEFAULT_WORKING_DIRECTORY)
app_url = config['main'].get('app_url', DEFAULT_APP_URL)
timeout = config['main'].get('timeout', DEFAULT_TIMEOUT)
@ -56,6 +55,9 @@ except OSError as exception:
for f in files:
os.remove(f)
# HACK maybe Ubuntu specific
os.environ["TMPDIR"] = working_dir
driver_type = config['main']['driver']
# TODO only firefox for now
if driver_type == GECKO_DRIVER: