Changeset 353db8c for fedd/init_abac_authorizer.py
- Timestamp:
- Nov 23, 2010 5:00:48 PM (13 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master
- Children:
- 6e63513
- Parents:
- 3ff5e2a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/init_abac_authorizer.py
r3ff5e2a r353db8c 1 1 #!/usr/local/bin/python 2 3 import sys 2 4 3 5 from optparse import OptionParser … … 16 18 opts, args = parser.parse_args() 17 19 18 if any([ not x for x in (opts. key, opts.cert, opts.policy, opts.out_dir)]):20 if any([ not x for x in (opts.cert, opts.policy, opts.out_dir)]): 19 21 parser.print_help() 20 22 sys.exit(1) 21 22 a = abac_authorizer(key=opts.key, me=opts.cert, certs=opts.policy) 23 a.save(opts.out_dir) 23 try: 24 a = abac_authorizer(key=opts.key, me=opts.cert, certs=opts.policy, 25 save=opts.out_dir) 26 a.save(opts.out_dir) 27 except EnvironmentError, e: 28 sys.exit("Can't create or write %s: %s" % (e.filename, e.strerror)) 29 except abac_authorizer.bad_cert, e: 30 sys.exit("Error creating authorizer: %s" % e)
Note: See TracChangeset
for help on using the changeset viewer.