Mercurial > treepkg > treepkg
diff treepkg/util.py @ 462:058856954e2d
Make the compress_all_logs call builder independent and also compress
if an error occurs before the builders are executed.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Tue, 31 Aug 2010 15:56:46 +0000 |
parents | 454967511f5c |
children | 31b64ebe4b42 |
line wrap: on
line diff
--- a/treepkg/util.py Mon Aug 30 13:32:31 2010 +0000 +++ b/treepkg/util.py Tue Aug 31 15:56:46 2010 +0000 @@ -196,8 +196,9 @@ files in same folder with the cmd command. """ if reference_log and os.path.exists(reference_log): - log_dir = os.path.dirname(reference_log) - for log_file in [os.path.join(log_dir, f) + log_dir = os.path.isdir(reference_log) and \ + reference_log or os.path.dirname(reference_log) + for log_file in [os.path.join(log_dir, f) for f in os.listdir(log_dir)]: if os.path.isfile(log_file): run.call(cmdexpand(cmd, logfile=log_file))