diff --git a/protonfixes_test.py b/protonfixes_test.py index 83ce91b9..e8d4b71a 100644 --- a/protonfixes_test.py +++ b/protonfixes_test.py @@ -192,8 +192,8 @@ def testGetGameNone(self): self.assertTrue('SteamGameId' not in os.environ, 'SteamGameId is set') self.assertTrue('UMU_ID' not in os.environ, 'UMU_ID is set') self.assertTrue('SteamAppId' not in os.environ, 'SteamAppId is set') - result = func() - self.assertFalse(result, 'None was not returned') + with self.assertRaises(SystemExit): + func() def testGetStoreNameZoom(self): """Pass zoomplatform as store name diff --git a/util.py b/util.py index 35ecb21b..00c28302 100644 --- a/util.py +++ b/util.py @@ -68,7 +68,7 @@ def protondir() -> Path: @functools.lru_cache def protonprefix() -> Path: """Returns wineprefix's path used by proton""" - return Path(os.environ['STEAM_COMPAT_DATA_PATH']) / 'pfx' + return Path(os.environ.get('STEAM_COMPAT_DATA_PATH', '')) / 'pfx' @functools.lru_cache