Skip to content

Commit 331858f

Browse files
committed
fix python3 warnings conftest and test_virtual_chassis
in conftest, use the utf-8 decode when reading the output in test_virtual_chassis, iter no longer available in python3
1 parent 9cae70e commit 331858f

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ def ctn_runcmd(self, ctn, cmd):
11511151
res = ctn.exec_run(cmd)
11521152
try:
11531153
exitcode = res.exit_code
1154-
out = res.output
1154+
out = res.output.decode('utf-8')
11551155
except AttributeError:
11561156
exitcode = 0
11571157
out = res

tests/test_virtual_chassis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ def test_connectivity(self, vct):
66
return
77
dvss = vct.dvss
88
nbrs = vct.get_topo_neigh()
9-
for name in dvss.iterkeys():
9+
for name in dvss.keys():
1010
dv = dvss[name]
1111
#ping all vs's inband address
1212
for ctn in vct.inbands.keys():

0 commit comments

Comments
 (0)