Skip to content

Commit

Permalink
fixed #18
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammad-fiaz committed Dec 8, 2023
1 parent b81ad5d commit cf8aa4d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .idea/checkversions.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions checkversions/checkversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@ def get_default_hierarchy_from_json():
# Initialize DotSetup
ds = DotSetup()

# Get absolute path to JSON file
script_dir = os.path.dirname(os.path.abspath(__file__))
json_file_path = os.path.join(script_dir, '../default_hierarchy.json')

# Load from JSON file
value_json = ds.load('default_hierarchy', file_type='json', file_path=json_file_path)
value_json = ds.load('default_hierarchy', file_type='json', file_path='../default_hierarchy.json')
return value_json
except (FileNotFoundError, VariableNotFoundError, JSONDecodeError) as e:
print(f"Error loading default hierarchy from JSON: {e}")
Expand Down

0 comments on commit cf8aa4d

Please sign in to comment.