Skip to content

Commit

Permalink
python3: fix some syntax errors
Browse files Browse the repository at this point in the history
partial: vmware#55
  • Loading branch information
kevin1024 authored and hartsock committed Jul 28, 2014
1 parent f93ddf9 commit 2e1b8de
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pyVmomi/VmomiSupport.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
import pyVmomi.Iso8601
import base64
import threading

if sys.version > '3':
# python3 removed long, it's the same as int
long = int

NoneType = type(None)
try:
from pyVmomi.pyVmomiSettings import allowGetSet
Expand Down Expand Up @@ -358,7 +363,7 @@ def _InvokeMethod(info, self, *posargs, **kwargs):
args = list(posargs) + [None] * (len(info.params) - len(posargs))
if len(kwargs) > 0:
paramNames = [param.name for param in info.params]
for (k, v) in kwargs.items():
for (k, v) in list(kwargs.items()):
try:
idx = paramNames.index(k)
except ValueError:
Expand Down Expand Up @@ -1332,7 +1337,7 @@ def InverseMap(map):
vmodlNames = {}

## Add array type into special names
for name, typ in iteritems(vmodlTypes.copy()):
for name, typ in vmodlTypes.copy().items():
if typ is not NoneType:
try:
arrayType = typ.Array
Expand Down

0 comments on commit 2e1b8de

Please sign in to comment.