Fix '*' or name database in tisbackup gui

This commit is contained in:
ssamson-tis 2015-10-27 15:23:45 +01:00
parent e8708f1efa
commit af9471e56b

View File

@ -92,7 +92,7 @@ def read_config():
for backup_item in backup.backup_list:
if backup_item.backup_name in backup_sections:
b = {}
for attrib_name in backup_item.required_params+backup_item.required_params:
for attrib_name in backup_item.required_params+backup_item.optional_params:
if hasattr(backup_item,attrib_name):
b[attrib_name] = getattr(backup_item,attrib_name)
result.append(b)
@ -127,10 +127,10 @@ def read_config():
if backup_type == "null":
backup_dict['null_list'].append([server_name, backup_name, backup_type, ""])
if backup_type == "pgsql+ssh":
db_name = row['db_name']
db_name = row['db_name'] if len(row['db_name']) > 0 else '*'
backup_dict['pgsql_list'].append([server_name, backup_name, backup_type, db_name])
if backup_type == "mysql+ssh":
db_name = row.get('db_name', '*')
db_name = row['db_name'] if len(row['db_name']) > 0 else '*'
backup_dict['mysql_list'].append([server_name, backup_name, backup_type, db_name])
if backup_type == "sqlserver+ssh":
db_name = row['db_name']