aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/GeneralObject.py8
-rw-r--r--wqflask/base/trait.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/wqflask/base/GeneralObject.py b/wqflask/base/GeneralObject.py
index 0fccaab3..707569db 100644
--- a/wqflask/base/GeneralObject.py
+++ b/wqflask/base/GeneralObject.py
@@ -33,7 +33,7 @@ class GeneralObject:
def __init__(self, *args, **kw):
self.contents = list(args)
- for name, value in kw.items():
+ for name, value in list(kw.items()):
setattr(self, name, value)
def __setitem__(self, key, value):
@@ -50,16 +50,16 @@ class GeneralObject:
def __str__(self):
s = ''
- for key in self.__dict__.keys():
+ for key in list(self.__dict__.keys()):
if key != 'contents':
s += '%s = %s\n' % (key, self.__dict__[key])
return s
def __repr__(self):
s = ''
- for key in self.__dict__.keys():
+ for key in list(self.__dict__.keys()):
s += '%s = %s\n' % (key, self.__dict__[key])
return s
def __cmp__(self, other):
- return len(self.__dict__.keys()).__cmp__(len(other.__dict__.keys()))
+ return len(list(self.__dict__.keys())).__cmp__(len(list(other.__dict__.keys())))
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index 7666348e..e82df226 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -118,7 +118,7 @@ class GeneralTrait(object):
vals = []
the_vars = []
sample_aliases = []
- for sample_name, sample_data in self.data.items():
+ for sample_name, sample_data in list(self.data.items()):
if sample_data.value != None:
if not include_variance or sample_data.variance != None:
samples.append(sample_name)
@@ -260,7 +260,7 @@ def get_sample_data():
trait_dict['pubmed_link'] = trait_ob.pubmed_link
trait_dict['pubmed_text'] = trait_ob.pubmed_text
- return json.dumps([trait_dict, {key: value.value for key, value in trait_ob.data.iteritems() }])
+ return json.dumps([trait_dict, {key: value.value for key, value in list(trait_ob.data.items()) }])
else:
return None