diff --git a/lib/Bastion/HPSS.py b/lib/Bastion/HPSS.py index 5e0304a..c8ab782 100644 --- a/lib/Bastion/HPSS.py +++ b/lib/Bastion/HPSS.py @@ -5,11 +5,13 @@ import datetime import json import socket +import logging from Bastion.Common import Thing, Unknown import Bastion.Model from Bastion.Curator import BLONDE +logger = logging.getLogger(__name__) #-------------------------------------------------------- @@ -445,9 +447,12 @@ def push(self, asset, **kwargs): } comargs = [str(opts['htar']), "-c", "-f", "{site}/{zone}/{asset}/{blonde}.tar".format(**opts), "-v", "-Hverify=1", "{localf}".format(**opts)] - proc = subprocess.run(comargs, capture_output = True, check = False, env = exports) + proc = subprocess.run(comargs, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, check = False, env = exports) stdout = proc.stdout.decode('utf-8') - stderr = proc.stderr.decode('utf-8') +# stderr = proc.stderr.decode('utf-8') + stderr = stdout + for line in stdout.split('\n'): + logger.info(line) flag = True if (proc.returncode == 0) else False return (flag, stdout, stderr)