Ignore:
Timestamp:
Nov 23, 2010 5:00:48 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
6e63513
Parents:
3ff5e2a
Message:

Vairous ABAC tweaks, mostly concerned with making key splitting less visible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/init_abac_authorizer.py

    r3ff5e2a r353db8c  
    11#!/usr/local/bin/python
     2
     3import sys
    24
    35from optparse import OptionParser
     
    1618opts, args = parser.parse_args()
    1719
    18 if any([ not x for x in (opts.key, opts.cert, opts.policy, opts.out_dir)]):
     20if any([ not x for x in (opts.cert, opts.policy, opts.out_dir)]):
    1921    parser.print_help()
    2022    sys.exit(1)
    21 
    22 a = abac_authorizer(key=opts.key, me=opts.cert, certs=opts.policy)
    23 a.save(opts.out_dir)
     23try:
     24    a = abac_authorizer(key=opts.key, me=opts.cert, certs=opts.policy,
     25            save=opts.out_dir)
     26    a.save(opts.out_dir)
     27except EnvironmentError, e:
     28    sys.exit("Can't create or write %s: %s" % (e.filename, e.strerror))
     29except abac_authorizer.bad_cert, e:
     30    sys.exit("Error creating authorizer: %s" % e)
Note: See TracChangeset for help on using the changeset viewer.