Skip to content

Commit

Permalink
Added debug logging. Corrected format for error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
System Administrator committed Mar 7, 2019
1 parent 1ccaf3e commit cf81902
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions config/src/main/config/home/harvest/workflows/baserules.py
Expand Up @@ -132,8 +132,10 @@ def __security(self):
self.utils.add(self.index, "security_exception", user)

# Ownership
self.log.debug("Checking for ownership...If there is none, will add system...")
if self.owner is None:
self.utils.add(self.index, "owner", "system")
self.log.debug("Added 'system' as owner")
else:
if self.owner == 'guest' and self.user_id != "":
self.log.debug("baseRule.py: Need to assign ownership by mapping user_id to user because user_id and default owner 'guest' are found.")
Expand Down
Expand Up @@ -219,7 +219,7 @@ def createDoi(self):
self.log.debug("Response Code: '{}'", code)
self.log.debug("Response Body: '{}'", body)
if code != "200":
self.throwError("Invalid response from ANDS server, code "+code+ ": "+body)
self.throwError("Invalid response from ANDS server, code "+ str(code) + ": " + str(body))
return

# Grab the DOI from their response string
Expand Down

0 comments on commit cf81902

Please sign in to comment.