From 78e07e3cce6e21e83a0c3986c0036adcd266a977 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 11 Feb 2015 10:13:58 -0500 Subject: Log paths are now available after job.logging() via self.logs dict --- htc_utils/bindings/job.py | 12 +++++++++--- 1 file 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]) -- cgit