mirror of
https://github.com/aclist/dztui.git
synced 2026-11-23 18:09:30 +01:00
Merge pull request #551 from aclist/chore/b31-debug-cleanup
chore: b31 debug cleanup
This commit is contained in:
7 files changed
+13
-7
No files matched your search
@@ -29,3 +29,8 @@ sphinx-build -M html source build -a
|
|||||||
2. Set up the build target: `rustup target add x86_64-unknown-linux-musl`
|
2. Set up the build target: `rustup target add x86_64-unknown-linux-musl`
|
||||||
3. Run `python3 scripts/release.py`
|
3. Run `python3 scripts/release.py`
|
||||||
4. Generate a release and tag against the resulting tarfile generated in `dist`
|
4. Generate a release and tag against the resulting tarfile generated in `dist`
|
||||||
|
|
||||||
|
### Running tests
|
||||||
|
|
||||||
|
Some tests are environment specific and require real configuration files.
|
||||||
|
For a generally environment-agnostic test suite, invoke `pytest -m "not realconfig, not flatpak"`
|
||||||
@@ -114,6 +114,7 @@ class Shortcuts:
|
|||||||
make_parents(dest)
|
make_parents(dest)
|
||||||
b = images.joinpath(img).with_suffix(".png").read_bytes()
|
b = images.joinpath(img).with_suffix(".png").read_bytes()
|
||||||
dest.write_bytes(b)
|
dest.write_bytes(b)
|
||||||
|
logger.debug(f"Wrote grid image to '{dest}'")
|
||||||
|
|
||||||
# NOTE: legacy Big Picture header
|
# NOTE: legacy Big Picture header
|
||||||
b = images.joinpath("_hero.png").read_bytes()
|
b = images.joinpath("_hero.png").read_bytes()
|
||||||
@@ -127,6 +128,7 @@ class Shortcuts:
|
|||||||
except Exception:
|
except Exception:
|
||||||
n = 0
|
n = 0
|
||||||
self.shortcuts["shortcuts"][str(n)] = entry
|
self.shortcuts["shortcuts"][str(n)] = entry
|
||||||
|
logger.debug(f"Added shortcut at index {n}")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _create_entry(cls, meta: ShortcutMetadata) -> dict[str, Any]:
|
def _create_entry(cls, meta: ShortcutMetadata) -> dict[str, Any]:
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ def copy_state_files(state_path: Path) -> None:
|
|||||||
".month",
|
".month",
|
||||||
]
|
]
|
||||||
if state_path == legacy:
|
if state_path == legacy:
|
||||||
# TODO: log this
|
logger.debug(f"Legacy state path '{legacy}' is identical to current")
|
||||||
return
|
return
|
||||||
for file in legacy.iterdir():
|
for file in legacy.iterdir():
|
||||||
if file.name in to_copy:
|
if file.name in to_copy:
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ from dzgui.api.probe import test_steam_api
|
|||||||
from dzgui.const.enum import Preferences
|
from dzgui.const.enum import Preferences
|
||||||
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
from dzgui.managers.threading import call_on_thread, StoredFunc, ThreadingManager
|
||||||
from dzgui.views.dialogs.generic import ExceptionDialog
|
from dzgui.views.dialogs.generic import ExceptionDialog
|
||||||
from dzgui.strings import dialogs
|
|
||||||
from dzgui.util._json import read_json, write_json
|
from dzgui.util._json import read_json, write_json
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class ConnectionManager:
|
|||||||
self.missing_mods = missing_mods
|
self.missing_mods = missing_mods
|
||||||
self.remote_mod_ids = [mod[1] for mod in remote_mods]
|
self.remote_mod_ids = [mod[1] for mod in remote_mods]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(e)
|
logger.critical(e)
|
||||||
self.thread_man.set_cleanup_func(failure_func, destroy_first=True)
|
self.thread_man.set_cleanup_func(failure_func, destroy_first=True)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class UpdateManager:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
func = StoredFunc(self._on_update_failure, str(e))
|
func = StoredFunc(self._on_update_failure, str(e))
|
||||||
self.thread_man.set_cleanup_func(func, destroy_first=True)
|
self.thread_man.set_cleanup_func(func, destroy_first=True)
|
||||||
logger.warning(e)
|
logger.critical(e)
|
||||||
|
|
||||||
def _on_update_success(self) -> None:
|
def _on_update_success(self) -> None:
|
||||||
msg = dialogs.update_success
|
msg = dialogs.update_success
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ class ServerModelManager:
|
|||||||
res = Servers.query_by_ip(addr)
|
res = Servers.query_by_ip(addr)
|
||||||
self._parse_single_record(res)
|
self._parse_single_record(res)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(e)
|
logger.critical(e)
|
||||||
self.thread_man.set_cleanup_func(
|
self.thread_man.set_cleanup_func(
|
||||||
StoredFunc(self._cleanup_on_failure), destroy_first=True
|
StoredFunc(self._cleanup_on_failure), destroy_first=True
|
||||||
)
|
)
|
||||||
@@ -219,7 +219,7 @@ class ServerModelManager:
|
|||||||
res = Servers.query_by_record(record)
|
res = Servers.query_by_record(record)
|
||||||
self._parse_single_record(res)
|
self._parse_single_record(res)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(e)
|
logger.critical(e)
|
||||||
self.thread_man.set_cleanup_func(
|
self.thread_man.set_cleanup_func(
|
||||||
StoredFunc(self._cleanup_on_failure), destroy_first=True
|
StoredFunc(self._cleanup_on_failure), destroy_first=True
|
||||||
)
|
)
|
||||||
@@ -232,7 +232,7 @@ class ServerModelManager:
|
|||||||
res = Servers.query_by_record(record)
|
res = Servers.query_by_record(record)
|
||||||
self._parse_single_record(res, delete=True)
|
self._parse_single_record(res, delete=True)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.warning(e)
|
logger.critical(e)
|
||||||
self.thread_man.set_cleanup_func(
|
self.thread_man.set_cleanup_func(
|
||||||
StoredFunc(self._cleanup_on_failure), destroy_first=True
|
StoredFunc(self._cleanup_on_failure), destroy_first=True
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in new issue
Block a user