From ded9cb03588f858cdd59f327dcf17055bd47e6fd Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 16 Nov 2022 11:36:04 +0530 Subject: [PATCH] Check if config contains update_branch before trying to write it to a script file --- ui/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/server.py b/ui/server.py index 9c80ea81..299b1a70 100644 --- a/ui/server.py +++ b/ui/server.py @@ -78,7 +78,7 @@ def setConfig(config): try: # config.bat config_bat = [ - f"@set update_branch={config['update_branch']}" + f"@set update_branch={config['update_branch']}" if 'update_branch' in config else "" ] config_bat_path = os.path.join(CONFIG_DIR, 'config.bat') @@ -95,7 +95,7 @@ def setConfig(config): try: # config.sh config_sh = [ '#!/bin/bash', - f"export update_branch={config['update_branch']}" + f"export update_branch={config['update_branch']}" if 'update_branch' in config else "" ] config_sh_path = os.path.join(CONFIG_DIR, 'config.sh')