Merge pull request 'in common_tools CryptUtils.decrypt() method' (#1) from 4-06-2025 into main

Reviewed-on: #1
This commit is contained in:
2025-06-08 00:52:27 +02:00
2 changed files with 22 additions and 19 deletions

View File

@ -5,6 +5,11 @@ Changelog for shared_libs
- add Info Window for user in delete logfile
bevore delete logfile.
### Added
03-06-2025
- in common_tools CryptUtils.decrypt() method
remove check file .dat is exist in path.
### Added
03-06-2025

View File

@ -21,13 +21,10 @@ class CryptoUtil:
"""
@staticmethod
def decrypt(user, path) -> None:
def decrypt(user) -> None:
"""
Starts SSL dencrypt
"""
if len([file.stem for file in path.glob("*.dat")]) == 0:
pass
else:
process: CompletedProcess[str] = run(
["pkexec", "/usr/local/bin/ssl_decrypt.py", "--user", user],
capture_output=True,
@ -42,6 +39,7 @@ class CryptoUtil:
if process.returncode == 0:
logging.info("Files successfully decrypted...", exc_info=True)
else:
logging.error(
f"Error process decrypt: Code {process.returncode}", exc_info=True
)