Skip to content

Commit

Permalink
Merge pull request #210 from ew4321/patch-1
Browse files Browse the repository at this point in the history
display useful message when no user exists in db
  • Loading branch information
elg committed Nov 1, 2017
2 parents 139035f + 8765ab5 commit 840e028
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions passhport/passhport
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,11 @@ if __name__ == '__main__':
url_passhport = "http" + conf.getboolean("SSL", "SSL")*"s" + \
"://" + conf.get("Network", "PASSHPORTD_HOSTNAME") + \
":" + conf.get("Network", "PORT") + "/"
target_list = get(url_passhport + "user" + "/accessible_targets/" + \
username).split("\n")
try:
target_list = get(url_passhport + "user" + "/accessible_targets/" + \
username).split("\n")
except AttributeError as e:
sys.exit("No user exists in database.")
originalcmd = os.environ.get('SSH_ORIGINAL_COMMAND')
choice = 0

Expand Down

0 comments on commit 840e028

Please sign in to comment.