summaryrefslogtreecommitdiff
path: root/clean_repo.py
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-11 12:39:40 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2011-04-11 12:39:40 -0500
commit3e27d11f68571bce92138f6cbfcaecac75fa1644 (patch)
tree36647c3691da83e85a0e06ceff3a4b47adf9f49b /clean_repo.py
parent857ecbe794c714919612b533303e7a9ef781c75b (diff)
Fixed some errors
Diffstat (limited to 'clean_repo.py')
-rwxr-xr-xclean_repo.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/clean_repo.py b/clean_repo.py
index b0d306f..d4e06fc 100755
--- a/clean_repo.py
+++ b/clean_repo.py
@@ -6,7 +6,9 @@ import argparse
def remove_from_blacklist(path_to_db, blacklisted_names,
debug=config["debug"]):
""" Check the blacklist and remove packages on the db"""
-
+ if "~" in path_to_db:
+ path_to_db=(os.path.expanduser(path_to_db))
+
pkgs=[pkg for pkg in pkginfo_from_db(path_to_db) if
pkg["name"] in blacklisted_names]
if pkgs:
@@ -19,6 +21,8 @@ def remove_from_blacklist(path_to_db, blacklisted_names,
return pkgs, cmd
def cleanup_nonfree_in_dir(directory, blacklisted_names):
+ if "~" in directory:
+ directory=(os.path.expanduser(directory))
pkgs=pkginfo_from_files_in_dir(directory)
for package in pkgs:
if package["name"] in blacklisted_names: