summaryrefslogtreecommitdiff
path: root/devel/management
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-11-04 21:43:39 -0500
committerDan McGee <dan@archlinux.org>2010-11-04 21:43:39 -0500
commit01cb0348e30b31c15a4bebbe3ecfb4605509d29d (patch)
tree8d0938b429b089ba524cd2cf904ad63a52ed7c31 /devel/management
parent3dea0da4a9b3fdb63be4e197ab49a5e1d1842398 (diff)
reporead: Use transparent compression on open
And make filename check more lenient. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management')
-rw-r--r--devel/management/commands/reporead.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index 983346cd..ef30977e 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -347,14 +347,14 @@ def parse_repo(repopath):
logger.info("Reading repo tarfile %s", repopath)
filename = os.path.split(repopath)[1]
- m = re.match(r"^(.*)\.(db|files)\.tar\.(.*)$", filename)
+ m = re.match(r"^(.*)\.(db|files)\.tar(\..*)?$", filename)
if m:
reponame = m.group(1)
else:
logger.error("File does not have the proper extension")
raise Exception("File does not have the proper extension")
- repodb = tarfile.open(repopath,"r:gz")
+ repodb = tarfile.open(repopath,"r")
## assuming well formed tar, with dir first then files after
## repo-add enforces this
logger.debug("Starting package parsing")