Use pyzebra lib default anatric location

This commit is contained in:
usov_i 2020-12-10 22:07:04 +01:00
parent 4b3b14e4ac
commit d6202d4a6b
2 changed files with 5 additions and 2 deletions

View File

@ -40,7 +40,7 @@ def main():
parser.add_argument( parser.add_argument(
"--anatric-path", "--anatric-path",
type=str, type=str,
default="/afs/psi.ch/project/sinq/rhel7/bin/anatric", default=None,
help="path to anatric executable", help="path to anatric executable",
) )

View File

@ -346,7 +346,10 @@ def create():
with tempfile.TemporaryDirectory() as temp_dir: with tempfile.TemporaryDirectory() as temp_dir:
temp_file = temp_dir + "/temp.xml" temp_file = temp_dir + "/temp.xml"
config.save_as(temp_file) config.save_as(temp_file)
pyzebra.anatric(temp_file, anatric_path=doc.anatric_path) if doc.anatric_path:
pyzebra.anatric(temp_file, anatric_path=doc.anatric_path)
else:
pyzebra.anatric(temp_file)
with open(config.logfile) as f_log: with open(config.logfile) as f_log:
output_log.value = f_log.read() output_log.value = f_log.read()