Changeset 77d05a5


Ignore:
Timestamp:
Sep 12, 2011 5:56:23 PM (13 years ago)
Author:
Ted Faber <faber@…>
Branches:
compt_changes, info-ops, master
Children:
74572ba
Parents:
a3bbb4a
Message:

Create ABAC directory if none is there. Closes #14

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/client_lib.py

    ra3bbb4a r77d05a5  
    172172    if opts.abac_dir:
    173173        if not os.access(opts.abac_dir, os.F_OK):
    174             raise RuntimeError("No ABAC directory: %s" % opts.abac_dir)
    175         elif not os.path.isdir(opts.abac_dir):
     174            try:
     175                os.mkdir(opts.abac_dir, 0700)
     176            except OSError, e:
     177                raise RuntimeError("No ABAC directory (could not create): %s" \
     178                        % opts.abac_dir)
     179
     180        if not os.path.isdir(opts.abac_dir):
    176181            raise RuntimeError("ABAC directory not a directory: %s" \
    177182                    % opts.abac_dir)
Note: See TracChangeset for help on using the changeset viewer.