python/semanage: fix Python syntax of catching several exceptions

"except OSError, ImportError:" does not perform what it says: it is the
Python 2 syntax of catching OSError exceptions as "ImportError" (like
"except OSError, e:"), and this is indeed caught by Python3:

      File "./python/semanage/seobject.py", line 143
        except OSError, ImportError:
                      ^
    SyntaxError: invalid syntax

The correct syntax consists in using parentheses.

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2018-08-04 11:03:14 +02:00
parent b12e246739
commit f6e7613bd3
No known key found for this signature in database
GPG key ID: C191415F340DAAA0

View file

@ -140,7 +140,7 @@ try:
self.log_list = []
self.log_change_list = []
except OSError, ImportError:
except (OSError, ImportError):
class logger:
def __init__(self):