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

Merge branch 'CMOS_FW_H2_Wrapper' into 'FW_H2_Wrapper'

Cmos fw h2 wrapper

See merge request !3
parents 0668947a 7dffccea
No related branches found
No related tags found
1 merge request!3Cmos fw h2 wrapper
Pipeline #6645 failed
...@@ -237,6 +237,7 @@ class Hawc2_Simulation(object): ...@@ -237,6 +237,7 @@ class Hawc2_Simulation(object):
is_good = True is_good = True
else: else:
file_obj.written_file = file_obj.original_file file_obj.written_file = file_obj.original_file
# Now write the HTC file # Now write the HTC file
self.input_files['htc'][0].written_file = os.path.join(self.write_directory, self.source_name) self.input_files['htc'][0].written_file = os.path.join(self.write_directory, self.source_name)
fout = open_file_in_dir(self.input_files['htc'][0].written_file, 'wb') fout = open_file_in_dir(self.input_files['htc'][0].written_file, 'wb')
...@@ -274,7 +275,7 @@ class Hawc2_Simulation(object): ...@@ -274,7 +275,7 @@ class Hawc2_Simulation(object):
else: else:
accompanying_file=os.path.abspath(os.path.realpath(accompanying_file)) accompanying_file=os.path.abspath(os.path.realpath(accompanying_file))
if not accompanying_file.startswith(self.source_directory): if not accompanying_file.startswith(self.source_directory):
raise ValueError('The accompanying file must be contained within the directory of the HTC file, or one of the sub-directories') raise ValueError('The accompanying file must be contained within the directory of the HTC file, or one of the sub-directories. file: {} not found'.format(accompanying_file))
destination=accompanying_file[len(self.source_directory)+1:] destination=accompanying_file[len(self.source_directory)+1:]
self.accompanying_files.append(accompanying_file) self.accompanying_files.append(accompanying_file)
self.accompanying_destinations.append(destination) self.accompanying_destinations.append(destination)
......
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