diff options
author | Dan McGee <dan@archlinux.org> | 2010-11-05 03:43:39 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-11-05 03:43:39 +0100 |
commit | 01cb0348e30b31c15a4bebbe3ecfb4605509d29d (patch) | |
tree | 8d0938b429b089ba524cd2cf904ad63a52ed7c31 /devel/management | |
parent | 3dea0da4a9b3fdb63be4e197ab49a5e1d1842398 (diff) | |
download | archweb-01cb0348e30b31c15a4bebbe3ecfb4605509d29d.tar.gz archweb-01cb0348e30b31c15a4bebbe3ecfb4605509d29d.tar.xz |
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.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 983346c..ef30977 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") |