diff --git a/lib/tuilib.py b/lib/tuilib.py index 4fa9b09..c038206 100755 --- a/lib/tuilib.py +++ b/lib/tuilib.py @@ -1920,16 +1920,16 @@ def warrior_trasnfer(rpc_connection): print(colorize("Choose y or n!", "red")) -def check_if_config_is_here(rpc_connection): - if os.path.exists("ROGUE.conf"): +def check_if_config_is_here(rpc_connection, config_name): + if os.path.exists(config_name): print(colorize("Config is already in daemon folder", "green")) else: if operating_system == 'Darwin': - path_to_config = os.environ['HOME'] + '/Library/Application Support/Komodo/ROGUE/ROGUE.conf' + path_to_config = os.environ['HOME'] + '/Library/Application Support/Komodo/ROGUE/' + config_name elif operating_system == 'Linux': - path_to_config = os.environ['HOME'] + '/.komodo/ROGUE/ROGUE.conf' + path_to_config = os.environ['HOME'] + '/.komodo/ROGUE/' + config_name elif operating_system == 'Win64' or operating_system == 'Windows': - path_to_config = '%s/komodo/ROGUE/ROGUE.conf' % os.environ['APPDATA'] + path_to_config = '%s/komodo/ROGUE/' + config_name % os.environ['APPDATA'] try: copy(path_to_config, os.getcwd()) except Exception as e: diff --git a/rogue_tui.py b/rogue_tui.py index ce0a457..f9feebd 100755 --- a/rogue_tui.py +++ b/rogue_tui.py @@ -101,7 +101,7 @@ def main(): rpc_connection.setpubkey(valid_pubkey) print(tuilib.colorize("Pubkey is succesfully set!", "green")) # copy ROGUE config to current daemon directory if it's not here - tuilib.check_if_config_is_here(rpc_connection) + tuilib.check_if_config_is_here(rpc_connection, "ROGUE.conf") except Exception: print(tuilib.colorize("Cant connect to ROGUE daemon RPC! Please check if daemon is up.", "pink")) tuilib.exit() diff --git a/tetris_tui.py b/tetris_tui.py index 6b6d7ef..5e0f704 100755 --- a/tetris_tui.py +++ b/tetris_tui.py @@ -81,7 +81,7 @@ def main(): rpc_connection.setpubkey(valid_pubkey) print(tuilib.colorize("Pubkey is succesfully set!", "green")) # copy ROGUE config to current daemon directory if it's not here - tuilib.check_if_config_is_here(rpc_connection) + tuilib.check_if_config_is_here(rpc_connection, "GTEST.conf") except Exception: print(tuilib.colorize("Cant connect to GTEST daemon RPC! Please check if daemon is up.", "pink")) tuilib.exit()