aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2015-02-11 10:13:58 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2015-02-11 10:13:58 -0500
commit78e07e3cce6e21e83a0c3986c0036adcd266a977 (patch)
tree4f4d4371259efec19b1d1e45c5ef6bf29f74fa51
parentb1c353f9ee838891cfba6c53f97b6171f59c5fcb (diff)
downloadhtc_utils-78e07e3cce6e21e83a0c3986c0036adcd266a977.tar.gz
Log paths are now available after job.logging() via self.logs dict
-rw-r--r--htc_utils/bindings/job.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/htc_utils/bindings/job.py b/htc_utils/bindings/job.py
index 79771fc..107e582 100644
--- a/htc_utils/bindings/job.py
+++ b/htc_utils/bindings/job.py
@@ -88,6 +88,8 @@ class Job(object):
self.attr('stack_size', ''),
]
+ self.logs = {}
+
for key, value in kwargs.items():
self.attr(key, value)
@@ -125,9 +127,13 @@ class Job(object):
if create and not os.path.exists(path):
os.mkdir(os.path.abspath(path))
- self.attr('log', os.path.normpath(os.path.join(path, '.'.join(['condor_$(Cluster)', ext]))))
- self.attr('output', os.path.normpath(os.path.join(path, '.'.join(['stdout_$(Cluster)_$(Process)', ext]))))
- self.attr('error', os.path.normpath(os.path.join(path, '.'.join(['stderr_$(Cluster)_$(Process)', ext]))))
+ self.logs['log'] = os.path.normpath(os.path.join(path, '.'.join(['condor_$(Cluster)', ext])))
+ self.logs['output'] = os.path.normpath(os.path.join(path, '.'.join(['stdout_$(Cluster)_$(Process)', ext])))
+ self.logs['error'] = os.path.normpath(os.path.join(path, '.'.join(['stderr_$(Cluster)_$(Process)', ext])))
+
+ self.attr('log', self.logs['log'])
+ self.attr('output', self.logs['output'])
+ self.attr('error', self.logs['error'])
def attr(self, key, *args):
value = ' '.join([recast(x) for x in args])