ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CRAB/python/ScriptWriter.py
(Generate patch)

Comparing COMP/CRAB/python/ScriptWriter.py (file contents):
Revision 1.5 by fanzago, Tue Oct 4 18:19:33 2005 UTC vs.
Revision 1.6 by slacapra, Thu Oct 13 17:10:03 2005 UTC

# Line 5 | Line 5 | from crab_logger import Logger
5   from crab_exceptions import *
6   import common
7  
8 < import string
8 > import string,os
9  
10   class ScriptWriter:
11      def __init__(self, template):
# Line 22 | Line 22 | class ScriptWriter:
22              'register_output'             : self.registerOutput_
23              }
24          
25 <        self.template = template
25 >        if os.path.isfile("./"+template):
26 >            self.template = "./"+template
27 >        elif os.getenv('CRABDIR') and os.path.isfile(os.getenv('CRABDIR')+'/python/'+template):
28 >            self.template = os.getenv('CRABDIR')+'/python/'+template
29 >        else:
30 >            raise CrabException("No crab_template.sh found!")
31          self.nj = -1     # current job number
32          return
33  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines