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

Comparing COMP/CRAB/python/SchedulerEdg.py (file contents):
Revision 1.18 by slacapra, Thu Oct 13 17:10:03 2005 UTC vs.
Revision 1.19 by slacapra, Tue Oct 18 14:11:12 2005 UTC

# Line 510 | Line 510 | class SchedulerEdg(Scheduler):
510          timeleft = -999
511          minTimeLeft=10 # in hours
512          cmd = 'grid-proxy-info -e -v '+str(minTimeLeft)+':00'
513 <        cmd_out = runCommand(cmd,0)
514 <        if (cmd_out=='1'):
513 >        try: cmd_out = runCommand(cmd,0)
514 >        except: print cmd_out
515 >        if (cmd_out == None or cmd_out=='1'):
516              common.logger.message( "No valid proxy found or timeleft too short!\n Creating a user proxy with default length of 100h\n")
517              cmd = 'grid-proxy-init -valid 100:00'
518              try:
519 <                os.system(cmd)
519 >                out = os.system(cmd)
520 >                if (out>0): raise CrabException("Unable to create a valid proxy!\n")
521              except:
522                  msg = "Unable to create a valid proxy!\n"
523                  raise CrabException(msg)
524              cmd = 'grid-proxy-info -timeleft'
525              cmd_out = runCommand(cmd,0)
526 <            print time.time()
526 >            print cmd_out, time.time()
527              #time.time(cms_out)
528              pass
529          self.proxyValid=1

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines