From 27dabb45282911e375336f75934af9dd6cc5d963 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 30 Jul 2015 16:49:29 +0200 Subject: Modernize 'except' clauses The 'as' syntax works from Python 2 on, and Python 3 will drop the "comma" syntax. Reviewed-By: Tomas Babej --- ipapython/sysrestore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipapython/sysrestore.py') diff --git a/ipapython/sysrestore.py b/ipapython/sysrestore.py index 935e4c6ce..a542b28c9 100644 --- a/ipapython/sysrestore.py +++ b/ipapython/sysrestore.py @@ -276,7 +276,7 @@ class FileStore: try: os.unlink(backup_path) - except Exception, e: + except Exception as e: root_logger.error('Error removing %s: %s' % (backup_path, str(e))) del self.files[filename] -- cgit