Skip to content

Commit

Permalink
informative error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
adkinsrs committed Oct 10, 2024
1 parent 96fe448 commit af56186
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/geardb.py
Original file line number Diff line number Diff line change
Expand Up @@ -643,14 +643,14 @@ def base_path(self):

elif self.type == 'user_saved':
if self.user_id is None:
raise Exception("ERROR: base_path() called on Analysis object with no user_id attribute set.")
raise Exception("ERROR: base_path() called on Analysis object with no user_id attribute set. Probably not logged in.")

# ./$user_id/$dataset_id/$analysis_id/$dataset_id.h5ad
return "{0}/../www/analyses/by_user/{1}/{2}/{3}".format(this_dir, self.user_id, self.dataset_id, self.id)

elif self.type == 'user_unsaved':
if self.session_id is None:
raise Exception("ERROR: base_path() called on Analysis object with no session_id attribute set.")
raise Exception("ERROR: base_path() called on Analysis object with no session_id attribute set. Probably not logged in.")

# /tmp/$session/$dataset_id/$analysis_id/$dataset_id.h5ad
return "/tmp/{0}/{1}/{2}".format(self.session_id, self.dataset_id, self.id)
Expand Down

0 comments on commit af56186

Please sign in to comment.