Commit b004327a authored by Domanski, Marian M.'s avatar Domanski, Marian M.
Browse files

pull ras plan from root file name and extension

parent 09976876
......@@ -155,10 +155,11 @@ class RASProject:
"""Fetch RAS file plan name
"""
plan_file_extension = current_plan_line.split('=')[-1]
path, _ = os.path.split(current_project_file_path)
plan_file_list = glob.glob(path + '/*.' + plan_file_extension)
path, proj_file = os.path.split(current_project_file_path)
root, _ = os.path.splitext(proj_file)
plan_file_path = os.path.join(path, root + '.' + plan_file_extension)
with open(plan_file_list[0], 'r') as f:
with open(plan_file_path, 'r') as f:
plan_name_line = f.readline().strip()
return plan_name_line.split('=')[-1]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment