From 18c9f6b9c249107db6ef64b3dd2de71e89ed00d5 Mon Sep 17 00:00:00 2001 From: Aidaho12 Date: Fri, 26 Jan 2018 10:26:02 +0600 Subject: [PATCH] v1.4.1 Fixed bugs --- cgi-bin/diff.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/cgi-bin/diff.py b/cgi-bin/diff.py index 386ef1fe..03c99e39 100644 --- a/cgi-bin/diff.py +++ b/cgi-bin/diff.py @@ -23,8 +23,6 @@ path_config = "haproxy-webintarface.config" config = configparser.ConfigParser() config.read(path_config) -ssh_keys = config.get('ssh', 'ssh_keys') -ssh_user_name = config.get('ssh', 'ssh_user_name') haproxy_configs_server = config.get('configs', 'haproxy_configs_server') hap_configs_dir = config.get('configs', 'haproxy_save_configs_dir') @@ -35,12 +33,12 @@ if form.getvalue('serv') is not None and form.getvalue('open') is not None : print('
') print('

Choose leftChoose right

') - print('

') print('') os.chdir(hap_configs_dir) - for files in glob.glob('*.cfg'): + for files in sorted(glob.glob('*.cfg')): ip = files.split("-") if serv == ip[0]: if left == files: @@ -51,10 +49,10 @@ if form.getvalue('serv') is not None and form.getvalue('open') is not None : print('') - print('') print('') - for files in glob.glob('*.cfg'): + for files in sorted(glob.glob('*.cfg')): ip = files.split("-") if serv == ip[0]: if right == files: @@ -66,13 +64,11 @@ if form.getvalue('serv') is not None and form.getvalue('open') is not None : print('') print('' % serv) print('') - print('

') + print('

') if form.getvalue('serv') is not None and form.getvalue('right') is not None: commands = [ 'diff -ub %s%s %s%s' % (hap_configs_dir, left, hap_configs_dir, right) ] funct.ssh_command(haproxy_configs_server, commands, compare="compare") - print('

UP') - funct.footer() \ No newline at end of file