Skip to content

Commit

Permalink
Merge pull request #36 from BharatKambalur/patch-1
Browse files Browse the repository at this point in the history
Updated trident_path() to be OS Independent
  • Loading branch information
brittonsmith committed Apr 9, 2018
2 parents cbeaa94 + 8fc8a4c commit a2fbaa4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions trident/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ def trident_path():
>>> print(trident_path())
"""
path_list = os.path.dirname(__file__).split('/')[:-1]
path_list.append('trident')
return '/'.join(path_list)
# os.path.split(__file__)returns a tuple with [0] the path to the file
# and [1] the filename.
# Here, __file__ refers to this file (config.py)
return os.path.split(__file__)[0]

def create_config():
"""
Expand Down

0 comments on commit a2fbaa4

Please sign in to comment.