summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
authoromtinez <omtinez@gmail.com>2015-10-29 19:16:48 -0700
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-10-30 11:34:53 +0300
commit17c649da3d406f72907f46acc9473bbeebb30d91 (patch)
tree59d942bb12e7e1f3003ae7a9d773004db47f799b /py
parent6f70283909a718ca4eab4efcdd1a2d74939c7193 (diff)
downloadmicropython-17c649da3d406f72907f46acc9473bbeebb30d91.tar.gz
micropython-17c649da3d406f72907f46acc9473bbeebb30d91.zip
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.
Diffstat (limited to 'py')
-rw-r--r--py/makeversionhdr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/makeversionhdr.py b/py/makeversionhdr.py
index e95e0c6076..1d8f59bd22 100644
--- a/py/makeversionhdr.py
+++ b/py/makeversionhdr.py
@@ -57,7 +57,7 @@ def get_version_info_from_git():
return git_tag, git_hash, ver
def get_version_info_from_docs_conf():
- with open("%s/docs/conf.py" % sys.argv[0].rsplit("/", 2)[0]) as f:
+ with open(os.path.join(os.path.dirname(sys.argv[0]), "..", "docs", "conf.py")) as f:
for line in f:
if line.startswith("release = '"):
ver = line.strip()[10:].strip("'")