From 866e4f7768c98e66bb5b37b99777f90e5bcf2ad4 Mon Sep 17 00:00:00 2001 From: Eric Mesa Date: Sat, 27 Jul 2024 20:00:16 -0400 Subject: [PATCH] A few updates - updated requirements.txt with new versions - removed pre-commit - added another exception in hopes that it gives better output on ssh error --- .gitignore | 1 + .pre-commit-config.yaml | 15 --------------- requirements.txt | 14 ++------------ setup.cfg | 4 ++-- snapintime/__init__.py | 2 +- snapintime/remote_backup.py | 3 ++- 6 files changed, 8 insertions(+), 31 deletions(-) delete mode 100644 .pre-commit-config.yaml diff --git a/.gitignore b/.gitignore index 8fa7f32..cbedbc2 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ pyvenv.cfg */*.mypy_cache/* .idea/ snapintime/utils/.mypy_cache/ +venv \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml deleted file mode 100644 index 8028ff2..0000000 --- a/.pre-commit-config.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# See https://pre-commit.com for more information -# See https://pre-commit.com/hooks.html for more hooks -repos: -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 - hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files -- repo: https://github.com/PyCQA/isort - rev: 5.12.0 - hooks: - - id: isort - name: isort (python) diff --git a/requirements.txt b/requirements.txt index 8c91ee3..b548c90 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,2 @@ -attrs~=21.4.0 -mypy~=0.950 -packaging~=21.3 -pluggy~=1.0.0 -py~=1.11.0 -pyparsing~=3.0.8 -pytest~=7.1.2 -xdgenvpy~=2.3.5 - -wheel~=0.37.1 -Pygments~=2.12.0 -rich~=12.3.0 +xdgenvpy +rich \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 16ef4f2..e610cf4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -17,5 +17,5 @@ classifiers = include_package_data = True packages = find: install_requires = - xdgenvpy == 2.3.5 - rich == 12.3.0 + xdgenvpy == 2.4.0 + rich == 13.7.1 diff --git a/snapintime/__init__.py b/snapintime/__init__.py index 2f152ef..1359fc8 100644 --- a/snapintime/__init__.py +++ b/snapintime/__init__.py @@ -1,5 +1,5 @@ __author__ = "Eric Mesa" -__version__ = "2.1.2" +__version__ = "2.2.0" __license__ = "GNU GPL v3.0" __copyright__: str = "(c) 2014 - 2023 Eric Mesa" __email__: str = "ericsbinaryworld at gmail dot com" diff --git a/snapintime/remote_backup.py b/snapintime/remote_backup.py index 754c072..882b5e6 100644 --- a/snapintime/remote_backup.py +++ b/snapintime/remote_backup.py @@ -72,7 +72,8 @@ def btrfs_send_receive(local_subvols: list, remote_subvol: str, backup_location: "Return Code": raw_result.returncode, "Output": raw_result.stdout, } - + except subprocess.CalledProcessError as e: + return {"Command": e.cmd, "Return Code:": e.returncode, "Output": e.stderr} except subprocess.SubprocessError as e: return {"Command": e.args, "Return Code": e.returncode, "Output": e.stderr} # type: ignore