diff options
author | 1138-4EB <1138-4EB@users.noreply.github.com> | 2019-06-25 06:09:45 +0200 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2019-06-25 06:09:45 +0200 |
commit | 5a423cc6742b02922533e9ac279677684322e655 (patch) | |
tree | 300f7976a4a48f1932642d62486ba9a7cf398d51 /doc/helpers.py | |
parent | 8ed91011ffeeb38b725a5645e76efe3969d152c9 (diff) | |
download | ghdl-5a423cc6742b02922533e9ac279677684322e655.tar.gz ghdl-5a423cc6742b02922533e9ac279677684322e655.tar.bz2 ghdl-5a423cc6742b02922533e9ac279677684322e655.zip |
Fix some issues with the docs (#857)
* fix: minor doc issues
* fix: doc/helpers.py
Diffstat (limited to 'doc/helpers.py')
-rw-r--r-- | doc/helpers.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/helpers.py b/doc/helpers.py index bd8d10ad4..f30e249dc 100644 --- a/doc/helpers.py +++ b/doc/helpers.py @@ -1,3 +1,6 @@ +from os.path import dirname, join +import json + # Try to load JSON data from a file. If not found, use the argument as a tag name and retrieve the data from GitHub. def getJSON(tag='all'): f = tag @@ -6,9 +9,8 @@ def getJSON(tag='all'): f = 'releases' tag = '' - import json try: - d = json.loads(open(f+'.json', 'r').read()) + d = json.loads(open(join(dirname(__file__), f+'.json'), 'r').read()) except: from urllib.request import urlopen d = json.loads(urlopen('https://api.github.com/repos/ghdl/ghdl/releases'+tag).read()) |