Skip to content

Commit b910133

Browse files
author
Bill Weide
committed
For this change I used the 3.6.8 version of 2to3 to detect and make the
bulk of the changes. I also changed all #!/usr/bin/env python to python3 Signed-off-by: Bill Weide <[email protected]>
1 parent 8b230a9 commit b910133

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+134
-157
lines changed

.travis.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ python:
3737
- '3.5'
3838
- '3.4'
3939
- '3.3'
40-
- '2.7'
4140
git:
4241
depth: 1000
4342
before_install:
@@ -81,7 +80,7 @@ deploy:
8180
skip_cleanup: true
8281
on:
8382
branch: master
84-
python: 2.7
83+
python: 3.6
8584

8685
after_success:
8786
env:

pyclient/pymtt.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# Copyright (c) 2018 Cisco Systems, Inc. All rights reserved.
@@ -9,9 +9,7 @@
99
# $HEADER$
1010
#
1111

12-
from __future__ import print_function
13-
from future import standard_library
14-
standard_library.install_aliases()
12+
1513
import os
1614
import sys
1715
import configparser

pylib/Stages/BIOS/BIOSMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/Firmware/FirmwareMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/Firmware/FooFlash.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#
1010

1111

12-
from __future__ import print_function
12+
1313
from FirmwareMTTStage import *
1414

1515
## @addtogroup Stages

pylib/Stages/LauncherDefaults/LauncherDefaultsMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/MTTDefaults/DefaultMTTDefaults.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
import os
1313
from MTTDefaultsMTTStage import *
1414

@@ -110,7 +110,7 @@ def execute(self, log, keyvals, testDef):
110110

111111
# we need to record the results into our options so
112112
# subsequent sections can capture them
113-
keys = cmds.keys()
113+
keys = list(cmds.keys())
114114
for key in keys:
115115
self.options[key] = (cmds[key], self.options[key][1])
116116
return

pylib/Stages/MTTDefaults/MTTDefaultsMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/MiddlewareBuild/MiddlewareBuildMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/MiddlewareGet/MiddlewareGetMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/Profile/CheckProfile.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
import os
1313
from ProfileMTTStage import *
1414
from ast import literal_eval
@@ -77,7 +77,7 @@ def execute(self, log, keyvals, testDef):
7777
testDef.parseOptions(log, self.options, keyvals, cmds)
7878

7979
keys = list(cmds.keys())
80-
opts = self.options.keys()
80+
opts = list(self.options.keys())
8181

8282
for key in keys:
8383
# diskSpace

pylib/Stages/Profile/DefaultProfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
import os
1313
from ProfileMTTStage import *
1414

pylib/Stages/Profile/ProfileMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/Provisioning/ProvisionMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/Provisioning/WWulf3.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from ProvisionMTTStage import *
1313
import shlex
1414

pylib/Stages/Reporter/IUDatabase.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# $HEADER$
1010
#
1111

12-
from __future__ import print_function
12+
1313
import os
1414
import pwd
1515
import requests
@@ -379,7 +379,7 @@ def _submit_test_run(self, logger, lg, metadata, s, url, testDef, httpauth=None)
379379
for lgentry in logger.getLog(None):
380380
if 'environ' in lgentry:
381381
environment.update(lgentry['environ'])
382-
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in environment.items()])
382+
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in list(environment.items())])
383383

384384

385385
# BIOS table
@@ -585,7 +585,7 @@ def _submit_test_build(self, logger, lg, metadata, s, url, httpauth=None):
585585
for lgentry in logger.getLog(None):
586586
if 'environ' in lgentry:
587587
environment.update(lgentry['environ'])
588-
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in environment.items()])
588+
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in list(environment.items())])
589589

590590
try:
591591
if options['merge_stdout_stderr']:
@@ -784,7 +784,7 @@ def _submit_install(self, logger, lg, metadata, s, url, httpauth=None):
784784
for lgentry in logger.getLog(None):
785785
if 'environ' in lgentry:
786786
environment.update(lgentry['environ'])
787-
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in environment.items()])
787+
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in list(environment.items())])
788788

789789
try:
790790
if options is not None and options['merge_stdout_stderr']:

pylib/Stages/Reporter/JunitXML.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
import os
1313
import sys
1414
import re

pylib/Stages/Reporter/ReporterMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/Reporter/TextFile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
import os
1313
import sys
1414
from ReporterMTTStage import *

pylib/Stages/TestBuild/DefaultTestBuild.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
import os
1313
from TestBuildMTTStage import *
1414

pylib/Stages/TestBuild/TestBuildMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/TestGet/TestGetMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/Stages/TestRun/PMIxUnit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# $HEADER$
1111
#
1212

13-
from __future__ import print_function
13+
1414
import os
1515
from TestRunMTTStage import *
1616
import shlex
@@ -81,7 +81,7 @@ def execute(self, log, keyvals, testDef):
8181

8282
# look for all keyvals starting with "test" as these
8383
# delineate the tests we are to run
84-
keys = keyvals.keys()
84+
keys = list(keyvals.keys())
8585
tests = []
8686
mykeyvals = {}
8787
for k in keys:

pylib/Stages/TestRun/TestRunMTTStage.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22
#
33
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
44
# $COPYRIGHT$
@@ -8,7 +8,7 @@
88
# $HEADER$
99
#
1010

11-
from __future__ import print_function
11+
1212
from yapsy.IPlugin import IPlugin
1313

1414
## @addtogroup Stages

pylib/System/LoadClasses.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from __future__ import print_function
1+
22
from builtins import object
33
#!/usr/bin/env python
44
#

0 commit comments

Comments
 (0)