Skip to content
Snippets Groups Projects
Commit d1a3746e authored by mimc's avatar mimc
Browse files

Fixed some minor bugs and have helpful debug messages now

parent c1c58254
No related branches found
No related tags found
No related merge requests found
Pipeline #6440 failed
...@@ -267,6 +267,8 @@ class Hawc2_Simulation(object): ...@@ -267,6 +267,8 @@ class Hawc2_Simulation(object):
old_home = os.getcwd() old_home = os.getcwd()
# Change to the htc directory # Change to the htc directory
if not os.path.isdir(self.write_directory):
os.makedirs(self.write_directory)
os.chdir(self.write_directory) os.chdir(self.write_directory)
# This is the point where you would specify that a file is running # This is the point where you would specify that a file is running
...@@ -431,7 +433,8 @@ class Hawc2_Simulation(object): ...@@ -431,7 +433,8 @@ class Hawc2_Simulation(object):
key = key[len('hawc2_output.'):] key = key[len('hawc2_output.'):]
return self.results[key] return self.results[key]
else: else:
raise KeyError('That key does not exist') error_message='The key "%s" does not exist'%(key)
raise KeyError(error_message)
# Set some information from on the object # Set some information from on the object
def __setitem__(self,key,value): def __setitem__(self,key,value):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment