mirror of
https://github.com/NohamR/pyzule-rw.git
synced 2026-10-10 18:39:41 +00:00
fix: plist not saving
This commit is contained in:
@@ -15,6 +15,10 @@ class Plist:
|
|||||||
def __getitem__(self, key: str) -> Any:
|
def __getitem__(self, key: str) -> Any:
|
||||||
return self.data.get(key, None)
|
return self.data.get(key, None)
|
||||||
|
|
||||||
|
def save(self) -> None:
|
||||||
|
with open(self.path, "w") as f:
|
||||||
|
plistlib.dump(self.data, f)
|
||||||
|
|
||||||
def remove(self, key: str) -> bool:
|
def remove(self, key: str) -> bool:
|
||||||
try:
|
try:
|
||||||
del self.data[key]
|
del self.data[key]
|
||||||
@@ -24,7 +28,8 @@ class Plist:
|
|||||||
|
|
||||||
def remove_uisd(self) -> None:
|
def remove_uisd(self) -> None:
|
||||||
if self.remove("UISupportedDevices"):
|
if self.remove("UISupportedDevices"):
|
||||||
print("[*] removed UISupportedDevices")
|
self.save()
|
||||||
|
print("[*] removed UISupportedDevices")
|
||||||
else:
|
else:
|
||||||
print("[?] no UISupportedDevices")
|
print("[?] no UISupportedDevices")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user