Few more py3 cleanups
This commit is contained in:
parent
ac6b7045db
commit
d277c6b821
1 changed files with 4 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
from __future__ import print_function
|
from __future__ import (absolute_import, division, print_function)
|
||||||
|
__metaclass__ = type
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import stat
|
import stat
|
||||||
|
@ -136,11 +137,11 @@ if __name__ == "__main__":
|
||||||
#display(" ", log_only=True)
|
#display(" ", log_only=True)
|
||||||
try:
|
try:
|
||||||
sys.exit(main(sys.argv[1:]))
|
sys.exit(main(sys.argv[1:]))
|
||||||
except AnsibleError, e:
|
except AnsibleError as e:
|
||||||
#display("ERROR: %s" % e, color='red', stderr=True)
|
#display("ERROR: %s" % e, color='red', stderr=True)
|
||||||
print(e)
|
print(e)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
except KeyboardInterrupt, ke:
|
except KeyboardInterrupt:
|
||||||
#display("ERROR: interrupted", color='red', stderr=True)
|
#display("ERROR: interrupted", color='red', stderr=True)
|
||||||
print("keyboard interrupt")
|
print("keyboard interrupt")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue