Mercurial > repos > yating-l > jbrowsearchivecreator
diff apollo/ApolloInstance.py @ 30:2191bd0798a9 draft
planemo upload for repository https://github.com/Yating-L/jbrowse-archive-creator.git commit 691e5366893905d30943a3cb8cdfb6341f0f5362-dirty
author | yating-l |
---|---|
date | Fri, 13 Oct 2017 16:19:03 -0400 |
parents | 31a41ce128cc |
children | 127037c49bc8 |
line wrap: on
line diff
--- a/apollo/ApolloInstance.py Fri Oct 13 16:00:38 2017 -0400 +++ b/apollo/ApolloInstance.py Fri Oct 13 16:19:03 2017 -0400 @@ -13,9 +13,11 @@ def createApolloUser(self, apollo_user, admin=None): p = subtools.arrow_create_user(apollo_user.user_email, apollo_user.firstname, apollo_user.lastname, apollo_user.password, admin) - user_info = json.loads(p) - user_id = user_info.get('userId') - if not user_id: + print p + if p: + user_info = json.loads(p) + user_id = user_info.get('userId') + if not p or not user_id: self.logger.debug("Cannot create new user: %s; The user may already exist", apollo_user.user_email) user_id = subtools.arrow_get_users(apollo_user.user_email) self.logger.debug("Got user_id for new or existing user: user_id = %s", str(user_id))