diff options
author | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-04-19 21:02:56 -0700 |
---|---|---|
committer | Joshua Ismael Haase Hernández <hahj87@gmail.com> | 2011-04-19 21:02:56 -0700 |
commit | ea23d5dff7b4e99e62ab582429f4a6f8b0263363 (patch) | |
tree | b86b885a63716fdbd5de0d61fb7d5b41b129ab4b /clean_repo.py | |
parent | 3ea44b887b3386219c3a9b176f2458fbd522baa7 (diff) |
Ready for testing in regular usage
Diffstat (limited to 'clean_repo.py')
-rwxr-xr-x | clean_repo.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clean_repo.py b/clean_repo.py index 6f3d632..51e62d4 100755 --- a/clean_repo.py +++ b/clean_repo.py @@ -25,10 +25,9 @@ def mkpending(packages_iterable, pending_file, blacklisted_names, fsock.write("\n".join([pkg["name"] + ":" + pkg["location"] + ":" + pkg["license"] for pkg in pkgs]) + "\n") - except(IOError): - raise NonValidFile("Can't read or write %s" % pending_file) - finally: fsock.close() + except(IOError): + printf("Can't read or write %s" % pending_file) return pkgs def remove_from_blacklist(path_to_db, blacklisted_names): @@ -70,7 +69,7 @@ if __name__ == "__main__": help="directory to clean") group_db=parser.add_argument_group("Clean non-free packages in db", - "All arguments need to be specified for db cleaning") + "All these arguments need to be specified for db cleaning:") group_db.add_argument("-b", "--database", type=str, help="dabatase to clean") group_db.add_argument("-p", "--pending-file", type=str, @@ -89,7 +88,7 @@ if __name__ == "__main__": if args.database: whitelisted=listado(args.whitelist_file) pkgs=pkginfo_from_db(args.database) - remove_from_blacklist(args.database, blacklisted) + # remove_from_blacklist(args.database, blacklisted) mkpending(pkgs, args.pending_file, blacklisted, whitelisted) |