git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f9ac11
)
fix bug in update_membership_list, oldRecord might be None
author
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Jun 2009 18:04:23 +0000
(18:04 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Tue, 16 Jun 2009 18:04:23 +0000
(18:04 +0000)
geni/util/api.py
patch
|
blob
|
history
diff --git
a/geni/util/api.py
b/geni/util/api.py
index
08e1134
..
2774f80
100644
(file)
--- a/
geni/util/api.py
+++ b/
geni/util/api.py
@@
-401,7
+401,10
@@
class GeniAPI:
def update_membership_list(self, oldRecord, record, listName, addFunc, delFunc):
# get a list of the HRNs tht are members of the old and new records
- oldList = oldRecord.get(listName, [])
+ if oldRecord:
+ oldList = oldRecord.get(listName, [])
+ else:
+ oldList = []
newList = record.get(listName, [])
# if the lists are the same, then we don't have to update anything