mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
added missing import
readded raise
This commit is contained in:
parent
51c3eda259
commit
0c82db9cda
1 changed files with 3 additions and 0 deletions
|
@ -32,6 +32,8 @@ import signal
|
||||||
import time
|
import time
|
||||||
import syslog
|
import syslog
|
||||||
|
|
||||||
|
# Backwards compat. There were present in basic.py before
|
||||||
|
from ansible.module_utils.pycompat24 import get_exception
|
||||||
|
|
||||||
syslog.openlog('ansible-%s' % os.path.basename(__file__))
|
syslog.openlog('ansible-%s' % os.path.basename(__file__))
|
||||||
syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % " ".join(sys.argv[1:]))
|
syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % " ".join(sys.argv[1:]))
|
||||||
|
@ -200,6 +202,7 @@ if __name__ == '__main__':
|
||||||
except SystemExit:
|
except SystemExit:
|
||||||
# On python2.4, SystemExit is a subclass of Exception.
|
# On python2.4, SystemExit is a subclass of Exception.
|
||||||
# This block makes python2.4 behave the same as python2.5+
|
# This block makes python2.4 behave the same as python2.5+
|
||||||
|
raise
|
||||||
|
|
||||||
except Exception:
|
except Exception:
|
||||||
e = sys.exc_info()[1]
|
e = sys.exc_info()[1]
|
||||||
|
|
Loading…
Reference in a new issue