mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-10-07 22:38:21 +03:00
Expand test coverage and fix lifecycle contracts
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -163,7 +163,7 @@ class Storage:
|
||||
)
|
||||
prefix = f'{index + 1} - ' if index >= 0 else ''
|
||||
|
||||
return prefix + configuration.itemRemark
|
||||
return prefix + profile.itemRemark
|
||||
except Exception:
|
||||
# Any non-exit exceptions
|
||||
|
||||
|
||||
@@ -38,13 +38,18 @@ class UserTUNSettings(Mixins.CleanupOnExit, StorageBackend):
|
||||
def restore():
|
||||
"""Restore the user TUN settings."""
|
||||
try:
|
||||
return UJSONEncoder.decode(
|
||||
data = UJSONEncoder.decode(
|
||||
PyBase64Encoder.decode(AppSettings.get('CustomTUNSettings'))
|
||||
)
|
||||
|
||||
if isinstance(data, dict):
|
||||
return data
|
||||
except Exception:
|
||||
# Any non-exit exceptions
|
||||
|
||||
return {}
|
||||
pass
|
||||
|
||||
return {}
|
||||
|
||||
self._data = restore()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user