summaryrefslogtreecommitdiff
path: root/clean_repo.py
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-19 21:02:56 -0700
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-19 21:02:56 -0700
commitea23d5dff7b4e99e62ab582429f4a6f8b0263363 (patch)
treeb86b885a63716fdbd5de0d61fb7d5b41b129ab4b /clean_repo.py
parent3ea44b887b3386219c3a9b176f2458fbd522baa7 (diff)
Ready for testing in regular usage
Diffstat (limited to 'clean_repo.py')
-rwxr-xr-xclean_repo.py9
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)