1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Description: Fixes for both py2 and py3 simultaneously
Author: Alastair McKinstry <mckinstry@debian.org>
Forwarded: no
Last-Updated: 2018-10-16
--- a/Pyext/script.py
+++ b/Pyext/script.py
@@ -7,5 +7,7 @@
#
#
-print 'Hello World !'
+from __future__ import print_function
+
+print ('Hello World !')
number = 42
--- a/Pyext/samples/api/sms2ecf.py
+++ b/Pyext/samples/api/sms2ecf.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python
""" one module to store needed function to translate SMS-ECFLOW suites """
+from __future__ import print_function
import sys
ECF_MODE = "ecflow" # "sms"
@@ -54,7 +55,7 @@
'SMSLOGTIMEOUT': 'ECF_LOGTIMEOUT',
}
-DICT_ECF_SMS = dict((v, k) for k, v in DICT_SMS_ECF.items())
+DICT_ECF_SMS = dict((v, k) for k, v in list(DICT_SMS_ECF.items()))
def translate(name, value=None):
""" find and replace submit, kill and status command, according to
--- a/tools/ecflow_fuse.py
+++ b/tools/ecflow_fuse.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2
+#!/usr/bin/python3
# file deepcode ignore SSHHostKeyVerificationDisabled: <comment the reason here>
from __future__ import print_function
import os
|