/[pdpsoft]/nl.nikhef.pdp.dynsched-pbs-plugin/branches/RB-2.2.0/vomaxjobs-maui.cin
ViewVC logotype

Diff of /nl.nikhef.pdp.dynsched-pbs-plugin/branches/RB-2.2.0/vomaxjobs-maui.cin

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2135 by templon, Thu Jan 6 15:47:55 2011 UTC revision 2136 by templon, Fri Jan 14 13:40:24 2011 UTC
# Line 15  import getopt Line 15  import getopt
15  import string  import string
16    
17  try:  try:
18      opts, args = getopt.getopt(sys.argv[1:], "h:i:",      opts, args = getopt.getopt(sys.argv[1:], "h:i:k:",
19                                 ["host=","input="])                                 ["host=","input=","keyfile="])
20  except getopt.GetoptError:  except getopt.GetoptError:
21      # print help information and exit:      # print help information and exit:
22      print sys.argv[0] + ": error parsing command line: " + \      print sys.argv[0] + ": error parsing command line: " + \
# Line 26  except getopt.GetoptError: Line 26  except getopt.GetoptError:
26    
27  schedhost = None  schedhost = None
28  infile = None  infile = None
29    keyarg = None
30    
31  for o, a in opts:  for o, a in opts:
32      if o in ("-h", "--host"):      if o in ("-h", "--host"):
33          schedhost = a          schedhost = a
34      elif o in ("-i", "--input"):      elif o in ("-i", "--input"):
35          infile = a          infile = a
36        elif o in ("-k", "--keyfile"):
37            keyarg = a
38                    
39  if infile:  if infile:
40      cmd = '/bin/cat ' + infile      cmd = '/bin/cat ' + infile
# Line 39  else: Line 42  else:
42      cmd = 'diagnose -g'      cmd = 'diagnose -g'
43      if schedhost:      if schedhost:
44          cmd = cmd + ' --host=' + schedhost          cmd = cmd + ' --host=' + schedhost
45        if keyarg:
46            cmd = cmd + ' --keyfile=' + keyarg
47            
48  import commands  import commands
49  (stat, out) = commands.getstatusoutput(cmd)  (stat, out) = commands.getstatusoutput(cmd)

Legend:
Removed from v.2135  
changed lines
  Added in v.2136

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28