8000 py/makeversionhdr.py: Work with backslashes in paths. · micropython/micropython@17c649d · GitHub
[go: up one dir, main page]

Skip to content

Commit 17c649d

Browse files
omtinezPaul Sokolovsky
authored and
Paul Sokolovsky
committed
py/makeversionhdr.py: Work with backslashes in paths.
This script may be called by Windows IDEs (e.g. Visual Studio) and be passed paths with backslashes.
1 parent 6f70283 commit 17c649d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

py/makeversionhdr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def get_version_info_from_git():
5757
return git_tag, git_hash, ver
5858

5959
def get_version_info_from_docs_conf():
60-
with open("%s/docs/conf.py" % sys.argv[0].rsplit("/", 2)[0]) as f:
60+
with open(os.path.join(os.path.dirname(sys.argv[0]), "..", "docs", "conf.py")) as f:
6161
for line in f:
6262
if line.startswith("release = '"):
6363
ver = line.strip()[10:].strip("'")

0 commit comments

Comments
 (0)
0