Skip to content

Commit

Permalink
Move import distro into method to avoid error while building docs (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
Trevor Morris authored Oct 13, 2020
1 parent 7c5658d commit bf43c86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
import guzzle_sphinx_theme
sys.path.insert(0, os.path.abspath('../python'))
os.environ['DLR_BUILD_DOC'] = '1' # Do not load libdlr.so when building doc
# Disable phone home
with open('../python/dlr/counter/ccm_config.json', 'w') as f:
f.write('{"enable_phone_home" : false}')

# -- Project information -----------------------------------------------------

Expand Down
2 changes: 1 addition & 1 deletion python/dlr/counter/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import uuid
import logging
import abc
import distro


from .deviceinfo import DeviceInfo
Expand All @@ -29,6 +28,7 @@ def __init__(self):
_md5uuid = get_hash_string(_uuid.encode())
self._device.uuid = str(_md5uuid.hexdigest())
self._device.osname = platform.system()
import distro
dist = distro.linux_distribution()
self._device.dist = " ".join(x for x in dist)
self._device.name = platform.node()
Expand Down

0 comments on commit bf43c86

Please sign in to comment.