Commit fcf8eaf8 authored by T.J. Corona's avatar T.J. Corona

Merge branch 'cmb6-ace3p' into 'master'

Update ACE3P exporter for CMB 6.

See merge request !58
parents 755067e5 d448267a
This diff is collapsed.
......@@ -67,9 +67,7 @@ class CumulusClient():
#print 'user', user
user_id = user['_id']
r = self._client.listFolder(user_id, 'user', name='Private')
if len(r) != 1:
raise Exception('Wrong number of users; should be 1 got %s' % len(r))
self._private_folder_id = r[0]['_id']
self._private_folder_id = r.next()['_id']
print 'private_folder_id', self._private_folder_id
# ---------------------------------------------------------------------
......@@ -346,10 +344,9 @@ class CumulusClient():
'''Returns folder_id, creating one if needed
'''
# Check if folder already exists
folder_list = self._client.listFolder(parent_id, name=name)
folder_list = list(self._client.listFolder(parent_id, name=name))
if folder_list:
folder = folder_list[0]
#print 'found folder %s: %s' % (name, str(folder))
return folder['_id']
# (else)
......
......@@ -16,7 +16,7 @@ def get_model_info(scope):
* scope.model_file
* scope.model_path
'''
scope.model_manager = scope.sim_atts.refModelManager()
scope.model_manager = scope.sim_atts.refModelResource()
mask = int(smtk.model.MODEL_ENTITY)
model_ents = scope.model_manager.entitiesMatchingFlags(mask, True)
#print 'model_ents', model_ents
......@@ -104,12 +104,9 @@ def get_entity_ids(scope, model_entity_item):
if not model_entity_item.isSet(i):
continue
ent_ref = model_entity_item.value(i)
ent = ent_ref.entity()
prop_idlist = scope.model_manager.integerProperty(ent, 'pedigree id')
#print 'idlist', idlist
ent = model_entity_item.objectValue(i)
prop_idlist = scope.model_manager.integerProperty(ent.id(), 'pedigree id')
if prop_idlist:
#scope.output.write(' %d' % idlist[0])
ent_idlist.append(prop_idlist[0])
return sorted(ent_idlist)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment