/[pdpsoft]/nl.nikhef.ndpf.3maand/trunk/3maand.py
ViewVC logotype

Diff of /nl.nikhef.ndpf.3maand/trunk/3maand.py

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

revision 2454 by templon, Fri Nov 4 13:28:59 2011 UTC revision 2455 by templon, Mon Dec 5 15:01:50 2011 UTC
# Line 18  total_cap = 39671 Line 18  total_cap = 39671
18    
19  import optparse  import optparse
20    
21    usage = "usage: %prog -p DBpwd start-date [end-date]\n" + \
22            "date format yyyy-mm-dd; default end date is 3 months after start date"
23    
24  p = optparse.OptionParser(description="Program to generate a CSV dump of computing usage " + \  p = optparse.OptionParser(description="Program to generate a CSV dump of computing usage " + \
25                            " by WLCG over a specified period")                            " by WLCG over a specified period",usage=usage)
26    
27  # dbpassword is mandatory  # dbpassword is mandatory
28  # start date is mandatory  # start date is mandatory
# Line 40  if not opts.dbpassw : Line 43  if not opts.dbpassw :
43            
44  if len(args) < 1:  if len(args) < 1:
45      sys.stderr.write("Error: no date argument detected.  A start date must be provided.\n")      sys.stderr.write("Error: no date argument detected.  A start date must be provided.\n")
46        sys.stderr.write("Format: yyyy-mm-dd\n")
47      sys.stderr.write("Bailing out.\n")      sys.stderr.write("Bailing out.\n")
48      sys.exit(1)      sys.exit(1)
49            

Legend:
Removed from v.2454  
changed lines
  Added in v.2455

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