protontool: fix run command

master
Taeyeon Mori 3 years ago
parent 767516f0fb
commit 96c90145ec
  1. 6
      lib/python/propex.py
  2. 4
      lib/python/steamutil.py

@ -30,13 +30,13 @@ class CustomProperty(property, Generic[T]):
def __get__(self, obj: Optional[O], cls: Type[O]): def __get__(self, obj: Optional[O], cls: Type[O]):
if obj is None: if obj is None:
return self return self
raise AttributeError(f"Cannot read property {self.property_name} of {obj:r}") raise AttributeError(f"Cannot read property {self.property_name} of {obj!r}")
def __set__(self, obj: O, value: T): def __set__(self, obj: O, value: T):
raise AttributeError(f"Cannot write property {self.property_name} of {obj:r}") raise AttributeError(f"Cannot write property {self.property_name} of {obj!r}")
def __delete__(self, obj: O): def __delete__(self, obj: O):
raise AttributeError(f"Cannot delete property {self.property_name} of {obj:r}") raise AttributeError(f"Cannot delete property {self.property_name} of {obj!r}")
class CachedProperty(CustomProperty[T]): class CachedProperty(CustomProperty[T]):

@ -8,7 +8,7 @@ from pathlib import Path
from typing import List, Iterable, Dict, Literal, Mapping, Tuple, Callable, Optional, Union, Any, cast, overload from typing import List, Iterable, Dict, Literal, Mapping, Tuple, Callable, Optional, Union, Any, cast, overload
from vdfparser import VdfParser, DeepDict, AppInfoFile, LowerCaseNormalizingDict, dd_getpath from vdfparser import VdfParser, DeepDict, AppInfoFile, LowerCaseNormalizingDict, dd_getpath
from propex import CachedProperty, DictPathProperty, DictPathRoProperty from propex import CachedProperty, SettableCachedProperty, DictPathProperty, DictPathRoProperty
_vdf = VdfParser() _vdf = VdfParser()
@ -405,7 +405,7 @@ class Steam:
def appinfo(self) -> AppInfoFile: def appinfo(self) -> AppInfoFile:
return AppInfoFile.open(self.appinfo_vdf) return AppInfoFile.open(self.appinfo_vdf)
@CachedProperty @SettableCachedProperty
def steamplay_manifest(self) -> DeepDict: def steamplay_manifest(self) -> DeepDict:
with self.appinfo as info: with self.appinfo as info:
return info[891390]["appinfo"] return info[891390]["appinfo"]

Loading…
Cancel
Save