remove leading character in postgres databases

This commit is contained in:
ssamson-tis 2015-09-30 16:28:34 +02:00
parent fe4081c7d3
commit 44a4b5ea15

View File

@ -78,8 +78,8 @@ class backup_pgsql(backup_generic):
raise Exception('Aborting, Not null exit code (%i) for "%s"' % (error_code,cmd)) raise Exception('Aborting, Not null exit code (%i) for "%s"' % (error_code,cmd))
databases = output.split('\n') databases = output.split('\n')
for database in databases: for database in databases:
if database.rstrip() not in ("", "template0", "template1"): if database.strip() not in ("", "template0", "template1"):
self.db_name = database.rstrip() self.db_name = database.strip()
self.do_pgsqldump(stats) self.do_pgsqldump(stats)
@ -165,4 +165,4 @@ class backup_pgsql(backup_generic):
else: else:
self.logger.info('Skipping %s, already registered',dir_name) self.logger.info('Skipping %s, already registered',dir_name)
register_driver(backup_pgsql) register_driver(backup_pgsql)