Mercurial > repos > yating-l > jbrowsearchivecreator
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 29:f5fbe894af85 | 30:2191bd0798a9 |
|---|---|
| 11 def getHost(self): | 11 def getHost(self): |
| 12 return self.apollo_host | 12 return self.apollo_host |
| 13 | 13 |
| 14 def createApolloUser(self, apollo_user, admin=None): | 14 def createApolloUser(self, apollo_user, admin=None): |
| 15 p = subtools.arrow_create_user(apollo_user.user_email, apollo_user.firstname, apollo_user.lastname, apollo_user.password, admin) | 15 p = subtools.arrow_create_user(apollo_user.user_email, apollo_user.firstname, apollo_user.lastname, apollo_user.password, admin) |
| 16 user_info = json.loads(p) | 16 print p |
| 17 user_id = user_info.get('userId') | 17 if p: |
| 18 if not user_id: | 18 user_info = json.loads(p) |
| 19 user_id = user_info.get('userId') | |
| 20 if not p or not user_id: | |
| 19 self.logger.debug("Cannot create new user: %s; The user may already exist", apollo_user.user_email) | 21 self.logger.debug("Cannot create new user: %s; The user may already exist", apollo_user.user_email) |
| 20 user_id = subtools.arrow_get_users(apollo_user.user_email) | 22 user_id = subtools.arrow_get_users(apollo_user.user_email) |
| 21 self.logger.debug("Got user_id for new or existing user: user_id = %s", str(user_id)) | 23 self.logger.debug("Got user_id for new or existing user: user_id = %s", str(user_id)) |
| 22 return user_id | 24 return user_id |
| 23 | 25 |
