Skip to content

Commit 8c96254

Browse files
committed
ensure windows code is only called on windows
1 parent 04f8509 commit 8c96254

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

resources/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@
1515

1616
__addon__ = xbmcaddon.Addon()
1717

18-
if os.name == 'nt':
19-
import _winreg
20-
21-
2218
plugin = routing.Plugin()
2319

2420
@plugin.route('/')

resources/registry.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
get registry values for steam games
33
'''
44

5-
import os, _winreg
5+
import os
66
import xbmc
77
from config import log
88

9+
if os.name == 'nt':
10+
import _winreg
11+
912
# https://github.com/lutris/lutris/blob/master/lutris/util/steam.py
1013
def vdf_parse(steam_config_file, config):
1114
"""Parse a Steam config file and return the contents as a dict."""
@@ -65,7 +68,7 @@ def get_registry_values(registry_path):
6568
else:
6669
app_dict[app_id] = installed
6770
i += 1
68-
71+
6972
except WindowsError:
7073
pass
7174
else:

0 commit comments

Comments
 (0)