Skip to content

Commit

Permalink
simplified getlink function
Browse files Browse the repository at this point in the history
  • Loading branch information
karuvally committed Jun 26, 2018
1 parent abc4b99 commit f3fa594
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions motivate/motivate.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@


def getlink(file):
if os.name == 'nt':
if os.path.islink(file):
path = os.path.dirname(os.readlink(file))
else:
path = os.path.dirname(file)
if os.path.islink(file):
path = os.path.dirname(os.readlink(file))
else:
if os.path.islink(file):
path = os.path.dirname(os.readlink(file))
else:
path = os.path.dirname(file)
path = os.path.dirname(file)

return os.path.dirname(path)


Expand Down

0 comments on commit f3fa594

Please sign in to comment.