Fixed tee command

This commit is contained in:
Dimitris Zlatanidis 2023-06-29 14:01:10 +03:00
parent 00feaf050c
commit 573715ae86

View file

@ -151,9 +151,9 @@ class Utilities(Configs):
output = tee = ''
if filename and self.process_log:
self.header_process_log(filename)
tee: str = f'| tee -a {self.slpkg_log_path}/{filename}_{self.process_log_date}_{self.process_log_time}.log'
tee: str = f' | tee -a {self.slpkg_log_path}/{filename}_{self.process_log_date}_{self.process_log_time}.log'
try:
output = subprocess.run(f'{command} {tee}', shell=True, stderr=stderr, stdout=stdout)
output = subprocess.run(f'{command}{tee}', shell=True, stderr=stderr, stdout=stdout)
except subprocess.CalledProcessError as error:
logger = logging.getLogger(LoggingConfig.date_time)
logger.exception(f'{self.__class__.__name__}'