Skip to content

Commit

Permalink
Merge pull request #886 from beardeddog/python3
Browse files Browse the repository at this point in the history
moving code from python2 to python3
  • Loading branch information
Bill Weide authored Dec 13, 2019
2 parents 8b230a9 + b910133 commit e19ff8b
Show file tree
Hide file tree
Showing 62 changed files with 134 additions and 157 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ python:
- '3.5'
- '3.4'
- '3.3'
- '2.7'
git:
depth: 1000
before_install:
Expand Down Expand Up @@ -81,7 +80,7 @@ deploy:
skip_cleanup: true
on:
branch: master
python: 2.7
python: 3.6

after_success:
env:
Expand Down
6 changes: 2 additions & 4 deletions pyclient/pymtt.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# Copyright (c) 2018 Cisco Systems, Inc. All rights reserved.
Expand All @@ -9,9 +9,7 @@
# $HEADER$
#

from __future__ import print_function
from future import standard_library
standard_library.install_aliases()

import os
import sys
import configparser
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/BIOS/BIOSMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/Firmware/FirmwareMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
2 changes: 1 addition & 1 deletion pylib/Stages/Firmware/FooFlash.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#


from __future__ import print_function

from FirmwareMTTStage import *

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/LauncherDefaults/LauncherDefaultsMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/MTTDefaults/DefaultMTTDefaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

import os
from MTTDefaultsMTTStage import *

Expand Down Expand Up @@ -110,7 +110,7 @@ def execute(self, log, keyvals, testDef):

# we need to record the results into our options so
# subsequent sections can capture them
keys = cmds.keys()
keys = list(cmds.keys())
for key in keys:
self.options[key] = (cmds[key], self.options[key][1])
return
4 changes: 2 additions & 2 deletions pylib/Stages/MTTDefaults/MTTDefaultsMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/MiddlewareBuild/MiddlewareBuildMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/MiddlewareGet/MiddlewareGetMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/Profile/CheckProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

import os
from ProfileMTTStage import *
from ast import literal_eval
Expand Down Expand Up @@ -77,7 +77,7 @@ def execute(self, log, keyvals, testDef):
testDef.parseOptions(log, self.options, keyvals, cmds)

keys = list(cmds.keys())
opts = self.options.keys()
opts = list(self.options.keys())

for key in keys:
# diskSpace
Expand Down
2 changes: 1 addition & 1 deletion pylib/Stages/Profile/DefaultProfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

import os
from ProfileMTTStage import *

Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/Profile/ProfileMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2016-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/Provisioning/ProvisionMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
2 changes: 1 addition & 1 deletion pylib/Stages/Provisioning/WWulf3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from ProvisionMTTStage import *
import shlex

Expand Down
8 changes: 4 additions & 4 deletions pylib/Stages/Reporter/IUDatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# $HEADER$
#

from __future__ import print_function

import os
import pwd
import requests
Expand Down Expand Up @@ -379,7 +379,7 @@ def _submit_test_run(self, logger, lg, metadata, s, url, testDef, httpauth=None)
for lgentry in logger.getLog(None):
if 'environ' in lgentry:
environment.update(lgentry['environ'])
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in environment.items()])
data['environment'] = "\n".join([str(k) + "=" + str(v) for k,v in list(environment.items())])


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

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

try:
if options is not None and options['merge_stdout_stderr']:
Expand Down
2 changes: 1 addition & 1 deletion pylib/Stages/Reporter/JunitXML.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

import os
import sys
import re
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/Reporter/ReporterMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
2 changes: 1 addition & 1 deletion pylib/Stages/Reporter/TextFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

import os
import sys
from ReporterMTTStage import *
Expand Down
2 changes: 1 addition & 1 deletion pylib/Stages/TestBuild/DefaultTestBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

import os
from TestBuildMTTStage import *

Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/TestBuild/TestBuildMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/TestGet/TestGetMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/TestRun/PMIxUnit.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# $HEADER$
#

from __future__ import print_function

import os
from TestRunMTTStage import *
import shlex
Expand Down Expand Up @@ -81,7 +81,7 @@ def execute(self, log, keyvals, testDef):

# look for all keyvals starting with "test" as these
# delineate the tests we are to run
keys = keyvals.keys()
keys = list(keyvals.keys())
tests = []
mykeyvals = {}
for k in keys:
Expand Down
4 changes: 2 additions & 2 deletions pylib/Stages/TestRun/TestRunMTTStage.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright (c) 2015-2018 Intel, Inc. All rights reserved.
# $COPYRIGHT$
Expand All @@ -8,7 +8,7 @@
# $HEADER$
#

from __future__ import print_function

from yapsy.IPlugin import IPlugin

## @addtogroup Stages
Expand Down
2 changes: 1 addition & 1 deletion pylib/System/LoadClasses.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from __future__ import print_function

from builtins import object
#!/usr/bin/env python
#
Expand Down
Loading

0 comments on commit e19ff8b

Please sign in to comment.