diff options
Diffstat (limited to 'setacls.py')
-rwxr-xr-x | setacls.py | 20 |
1 files changed, 9 insertions, 11 deletions
@@ -187,29 +187,27 @@ def main(): sys.stderr.write('You cannot specify both -a and a list of packages\n') sys.exit(1) + # something of a hack here - this list will only ever have one element. + # This is for support of multiple command line arguments and making sure + # that what's around is always a list. See below for when it can have more + # than one + if options.all: - acl_list = get_all() + acl_list = [] + acl_list.append = get_all() if options.dr: dry_run = True else: dry_run = False - # this is something of a hack in order to support multiple packages being - # specified on the command line. What this does is build a list of dicts - # of ACL object. Later we'll check if acl_list is a dict or a list, and - # DTRT. - if args: acl_list = [] for arg in args: acl_list.append(get_one(arg)) - if type(acl_list) == 'list': - for acl_dict in acl_list: - apply_acls(acl_dict, dry_run) - else: - apply_acls(acl_list, dry_run) + for acl_dict in acl_list: + apply_acls(acl_dict, dry_run) if __name__ == '__main__': main() |