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

Comparing COMP/CRAB/python/WorkSpace.py (file contents):
Revision 1.21 by farinafa, Fri Aug 10 15:45:07 2007 UTC vs.
Revision 1.22 by slacapra, Mon Sep 10 15:54:36 2007 UTC

# Line 45 | Line 45 | class WorkSpace:
45              msg += 'please change direcotry\n'
46              raise CrabException(msg)
47  
48      #  if (string.split(self._top_dir,'/')[-2]=='data'):
49      #      msg = 'Cannot run CRAB from "data" directory.\n'
50      #      msg += 'please change direcotry\n'
51      #      raise CrabException(msg)
52
53        
48          if not os.path.exists(self._top_dir):
49 <            os.mkdir(self._top_dir)
49 >            try:
50 >                os.mkdir(self._top_dir)
51 >            except OSError:
52 >                msg = 'Cannot create '+str(self._top_dir) +' directory.\n'
53 >                raise CrabException(msg)
54              pass
55          if not os.listdir(self._top_dir):
56              os.mkdir(self._log_dir)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines