From 02e9c4b8f3f005af2a39a1927dd6d693fa4238f0 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 27 Feb 2011 10:52:59 -0600 Subject: reporead: small cleanups --- devel/management/commands/reporead.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'devel') diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index bda3bd61..09e48559 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -391,16 +391,12 @@ def parse_repo(repopath): logger.error("File does not have the proper extension") raise Exception("File does not have the proper extension") - repodb = tarfile.open(repopath,"r") - ## assuming well formed tar, with dir first then files after - ## repo-add enforces this + repodb = tarfile.open(repopath, "r") logger.debug("Starting package parsing") dbfiles = ('desc', 'depends', 'files') pkgs = {} for tarinfo in repodb.getmembers(): - if tarinfo.isdir(): - continue - elif tarinfo.isreg(): + if tarinfo.isreg(): pkgid, fname = os.path.split(tarinfo.name) if fname not in dbfiles: continue -- cgit v1.2.3-55-g3dc8