Changeset a0c2866


Ignore:
Timestamp:
Dec 10, 2010 9:19:57 AM (14 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master
Children:
ddf0903
Parents:
52b6ebc
Message:

Make sure there is an abac directory.

Location:
fedd
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd_create.py

    r52b6ebc ra0c2866  
    157157svcs = []
    158158# Option processing
    159 cert, fid, url = wrangle_standard_options(opts)
     159try:
     160    cert, fid, url = wrangle_standard_options(opts)
     161except RuntimeError, e:
     162    sys.exit("%s" %e)
    160163
    161164if opts.file:
  • fedd/fedd_multiinfo.py

    r52b6ebc ra0c2866  
    2525parser = exp_data_opts()
    2626(opts, args) = parser.parse_args()
    27 cert, fid, url = wrangle_standard_options(opts)
     27try:
     28    cert, fid, url = wrangle_standard_options(opts)
     29except RuntimeError, e:
     30    sys.exit("%s" %e)
    2831
    2932try:
  • fedd/fedd_multistatus.py

    r52b6ebc ra0c2866  
    99parser = client_opts()
    1010(opts, args) = parser.parse_args()
    11 cert, fid, url = wrangle_standard_options(opts)
     11try:
     12    cert, fid, url = wrangle_standard_options(opts)
     13except RuntimeError, e:
     14    sys.exit("%s" %e)
    1215
    1316try:
  • fedd/fedd_new.py

    r52b6ebc ra0c2866  
    2525(opts, args) = parser.parse_args()
    2626
    27 cert, fid, url = wrangle_standard_options(opts)
    2827try:
     28    cert, fid, url = wrangle_standard_options(opts)
    2929    acerts = get_abac_certs(opts.abac_dir)
    3030except EnvironmentError, e:
    3131    sys.exit('%s: %s' % (e.filename, e.strerror))
     32except RuntimeError, e:
     33    sys.exit("%s" %e)
    3234
    3335out_certfile = opts.out_certfile
  • fedd/fedd_ns2topdl.py

    r52b6ebc ra0c2866  
    2020(opts, args) = parser.parse_args()
    2121
    22 cert, fid, url = wrangle_standard_options(opts)
     22try:
     23    cert, fid, url = wrangle_standard_options(opts)
     24except RuntimeError, e:
     25    sys.exit("%s" %e)
    2326
    2427if opts.file:
  • fedd/fedd_spewlog.py

    r52b6ebc ra0c2866  
    2727(opts, args) = parser.parse_args()
    2828
    29 cert, fid, url = wrangle_standard_options(opts)
     29try:
     30    cert, fid, url = wrangle_standard_options(opts)
     31except RuntimeError, e:
     32    sys.exit("%s" %e)
    3033
    3134if opts.exp_name and opts.exp_certfile:
  • fedd/fedd_terminate.py

    r52b6ebc ra0c2866  
    2929parser = terminate_opts()
    3030(opts, args) = parser.parse_args()
    31 cert, fid, url = wrangle_standard_options(opts)
     31
     32try:
     33    cert, fid, url = wrangle_standard_options(opts)
     34except RuntimeError, e:
     35    sys.exit("%s" %e)
    3236
    3337if opts.exp_name and opts.exp_certfile:
  • fedd/federation/client_lib.py

    r52b6ebc ra0c2866  
    147147    else: url = default_url
    148148
     149    if opts.abac_dir:
     150        if not os.access(opts.abac_dir, os.F_OK):
     151            raise RuntimeError("No ABAC directory: %s" % opts.abac_dir)
     152        elif not os.path.isdir(opts.abac_dir):
     153            raise RuntimeError("ABAC directory not a directory: %s" \
     154                    % opts.abac_dir)
     155        elif not os.access(opts.abac_dir, os.W_OK):
     156            raise RuntimeError("Cannot write to ABAC directory: %s" \
     157                    % opts.abac_dir)
     158
     159
    149160
    150161    return (cert, fid, url)
Note: See TracChangeset for help on using the changeset viewer.