Skip to content

Commit

Permalink
Temporary fix for finding the correct folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
Erlend Dalen - Erlend.Dalen@datakortet.no - +47 93 42 02 52 committed Dec 21, 2018
1 parent 71212c6 commit 3f06ec1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions dk/utils.py
Expand Up @@ -44,10 +44,14 @@ def srcpath(base, pth):
return srcroot + base + pth.replace('\\', '/')


def root(): # FIXME: this is fubar (__file__ isn't near the root of the source tree when utils is here...)
"Return the root of the source tree."
return __file__.replace('\\', '/').rsplit('/', 1)[0]

#def root(): # FIXME: this is fubar (__file__ isn't near the root of the source tree when utils is here...)
# "Return the root of the source tree."
# return __file__.replace('\\', '/').rsplit('/', 1)[0]
def root():
"Return the root of the source tree."
srcroot = __file__.replace('\\', '/').rsplit('/', 1)[0]
srcroot = srcroot.replace("lib/dk/dk", "src/datakortet")
return srcroot

# FIXME: this doesn't work since srcpath doesn't work!
def dkpath(pth=None):
Expand Down

0 comments on commit 3f06ec1

Please sign in to comment.