summaryrefslogtreecommitdiff
path: root/filter.py
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2011-04-19 22:29:07 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2011-04-19 22:29:07 -0300
commitcc5d8c36419467bdb8147049b70fd91d51acf444 (patch)
treeab625ff77ad255881626b6ee58f54213ea7b0b24 /filter.py
parente891caf97ee563e52b8f5e1f2448db2b0dc49228 (diff)
parent79e48771c2d64b50db5c8dadb4636e98fab94480 (diff)
Merge repo-maintainer into dbscripts. Repo-maintainer will be abandoned as
of this commit. Merge ssh://vparabola/srv/git/projects/repo-maintainer Conflicts: db-functions
Diffstat (limited to 'filter.py')
-rwxr-xr-xfilter.py16
1 files changed, 11 insertions, 5 deletions
diff --git a/filter.py b/filter.py
index c71f54d..5d90bdd 100755
--- a/filter.py
+++ b/filter.py
@@ -1,4 +1,4 @@
- #! /usr/bin/python
+#! /usr/bin/python
#-*- encoding: utf-8 -*-
from glob import glob
from repm.config import *
@@ -188,11 +188,17 @@ if __name__ == "__main__":
parser.add_argument("-k", "--blacklist-file", type=str,
help="File containing blacklisted names",
required=True,)
- parser.add_argument("-c", "--rsync-command", type=str,
- help="This command will be run to get a pkg list",
+ parser.add_argument("-f", "--rsout-file", type=str,
+ help="This file will be read to get a pkg list",
required=True,)
args=parser.parse_args()
- rsout=check_output(args.rsync_command.split())
+ try:
+ fsock=open(args.rsout_file, "r")
+ rsout=fsock.read()
+ except IOError:
+ print("%s is not readable" % args.rsout_file)
+ finally:
+ fsock.close()
packages=pkginfo_from_rsync_output(rsout)
- rsyncBlaclist_from_blacklist(packages, listado(args.blacklist_file),
+ rsyncBlacklist_from_blacklist(packages, listado(args.blacklist_file),
args.rsync_exclude_file)