diff --git a/libtisbackup/backup_pgsql.py b/libtisbackup/backup_pgsql.py index bbe6bd6..3f83c00 100644 --- a/libtisbackup/backup_pgsql.py +++ b/libtisbackup/backup_pgsql.py @@ -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) @@ -165,4 +165,4 @@ class backup_pgsql(backup_generic): else: self.logger.info('Skipping %s, already registered',dir_name) -register_driver(backup_pgsql) \ No newline at end of file +register_driver(backup_pgsql)