Commit b0b961f1 authored by Zeyu DONG's avatar Zeyu DONG
Browse files

fix error in getting current path

parent d40d5d13
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -69,10 +69,8 @@ def test_network(url):
def main():
    logger.info('Program started.')
    
    try:
        os.chdir(os.path.dirname(sys.argv[0]))  # To read config in the same directory
    except OSError:
        pass
    os.chdir(os.path.dirname(os.path.realpath(sys.argv[0])))  # To read config in the same directory
    
    config = load_config()
    times_retry_login = config['max_times_retry_login']
    test_url = config['captive_portal_server']