Fixed some python 3 issues

master
pbrod 9 years ago
parent 790c32757b
commit cce6c435a8

@ -603,7 +603,7 @@ class Bunch(object):
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
def keys(self): def keys(self):
return self.__dict__.keys() return list(self.__dict__)
def update(self, ** kwargs): def update(self, ** kwargs):
self.__dict__.update(kwargs) self.__dict__.update(kwargs)
@ -2244,7 +2244,7 @@ def getshipchar(value=None, property="max_deadweight", # @ReservedAssignment
merchant fleet", Bolt Beranek and Newman Technical Memorandum No. 458. merchant fleet", Bolt Beranek and Newman Technical Memorandum No. 458.
''' '''
if value is None: if value is None:
names = kwds.keys() names = list(kwds)
_assert(len(names) == 1, 'Only one keyword allowed!') _assert(len(names) == 1, 'Only one keyword allowed!')
property = names[0] # @ReservedAssignment property = names[0] # @ReservedAssignment
value = kwds[property] value = kwds[property]

Loading…
Cancel
Save