Merge pull request #13 from joshlay/rtd_import_testfix
only set/use CARD and hwmon_dir if not None
This commit is contained in:
commit
00e8eabb42
1 changed files with 29 additions and 28 deletions
|
@ -46,6 +46,7 @@ def find_card() -> Optional[Tuple[Optional[str], Optional[str]]]:
|
||||||
|
|
||||||
# base vars: card identifier, hwmon directory for stats, then the stat dicts
|
# base vars: card identifier, hwmon directory for stats, then the stat dicts
|
||||||
CARD, hwmon_dir = find_card()
|
CARD, hwmon_dir = find_card()
|
||||||
|
if CARD is not None:
|
||||||
card_dir = path.join("/sys/class/drm/", CARD) # eg: /sys/class/drm/card0/
|
card_dir = path.join("/sys/class/drm/", CARD) # eg: /sys/class/drm/card0/
|
||||||
|
|
||||||
# dictionary of known source files
|
# dictionary of known source files
|
||||||
|
|
Reference in a new issue