From 44a4b5ea1577c341d3f61c8fe8d8a3d3598c3f10 Mon Sep 17 00:00:00 2001 From: ssamson-tis Date: Wed, 30 Sep 2015 16:28:34 +0200 Subject: [PATCH] remove leading character in postgres databases --- libtisbackup/backup_pgsql.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)