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))
databases = output.split('\n')
for database in databases:
if database.rstrip() not in ("", "template0", "template1"):
self.db_name = database.rstrip()
if database.strip() not in ("", "template0", "template1"):
self.db_name = database.strip()
self.do_pgsqldump(stats)