mirror of
https://github.com/aclist/dztui.git
synced 2026-11-11 04:20:39 +01:00
fix: exception handling
This commit is contained in:
1 parent
4f6223f90b
commit
3677b01fdc
1 file changed
+7
-2
@@ -5,7 +5,12 @@ import shutil
|
|||||||
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from dzgui.const.constants import APP_NAME, LEGACY_CONFIG_PATH, LEGACY_COLS_PATH, LEGACY_IPS_PATH
|
from dzgui.const.constants import (
|
||||||
|
APP_NAME,
|
||||||
|
LEGACY_CONFIG_PATH,
|
||||||
|
LEGACY_COLS_PATH,
|
||||||
|
LEGACY_IPS_PATH,
|
||||||
|
)
|
||||||
from dzgui.config.convert import rc2json
|
from dzgui.config.convert import rc2json
|
||||||
from dzgui.util._json import read_json, write_json
|
from dzgui.util._json import read_json, write_json
|
||||||
|
|
||||||
@@ -84,5 +89,5 @@ def clean_legacy_versions_file(versions: Path) -> None:
|
|||||||
clean = [line for line in lines if re.match(pat, line)]
|
clean = [line for line in lines if re.match(pat, line)]
|
||||||
concat = "\n".join(clean)
|
concat = "\n".join(clean)
|
||||||
versions.write_text(concat)
|
versions.write_text(concat)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
logger.warning(e)
|
logger.warning(e)
|
||||||
Reference in new issue
Block a user