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:
parent
b12e246739
commit
f6e7613bd3
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ try:
|
|||
|
||||
self.log_list = []
|
||||
self.log_change_list = []
|
||||
except OSError, ImportError:
|
||||
except (OSError, ImportError):
|
||||
class logger:
|
||||
|
||||
def __init__(self):
|
||||
|
|
Loading…
Reference in a new issue