Skip to content

Commit

Permalink
DSANSIBLE-78 (#21)
Browse files Browse the repository at this point in the history
* DSANSIBLE-78
to Support Win
1) change hard coded path separator to os.sep

Signed-off-by: shipeng@us.ibm.com <shipeng@us.ibm.com>

* DSANSIBLE-78
to Support Win
1) change hard coded path separator to os.sep

Signed-off-by: shipeng@us.ibm.com <shipeng@us.ibm.com>

Co-authored-by: shipeng@us.ibm.com <shipeng@us.ibm.com>
  • Loading branch information
AnboAnbo and shipeng@us.ibm.com committed Jul 12, 2022
1 parent a9f48d3 commit 532cd1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@
import os
import sys

sys.path.insert(0, os.path.realpath(os.path.abspath('../')))
sys.path.append(os.path.abspath('../..'))
sys.path.insert(
0,
os.path.realpath(
os.path.abspath(f"..{os.sep}")
)
)
sys.path.append(os.path.abspath(f"..{os.sep}.."))

import pyds8k

Expand Down
2 changes: 1 addition & 1 deletion pyds8k/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def get_resource_route_prefix_by_class(cls):
path = os.path.abspath(
os.path.dirname(sys.modules[cls.__module__].__file__)
)
route = path.replace("/", ".")
route = path.replace(os.sep, ".")
return route.rsplit(".resources.", 2)[1]


Expand Down

0 comments on commit 532cd1e

Please sign in to comment.