Handle gzipped comps files.
This commit is contained in:
parent
1a5e874d84
commit
eb1a47579f
@ -1,3 +1,6 @@
|
|||||||
|
* Thu Feb 21 2008 Jesse Keating <jkeating@redhat.com>
|
||||||
|
- Handle gzipped comps files.
|
||||||
|
|
||||||
* Fri Feb 08 2008 Jesse Keating <jkeating@redhat.com>
|
* Fri Feb 08 2008 Jesse Keating <jkeating@redhat.com>
|
||||||
- Fix comps mashup to be more lenient with the open/close of <comps
|
- Fix comps mashup to be more lenient with the open/close of <comps
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ import yum
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
import gzip
|
||||||
import pypungi
|
import pypungi
|
||||||
import logging
|
import logging
|
||||||
import urlgrabber.progress
|
import urlgrabber.progress
|
||||||
@ -388,6 +389,10 @@ class Gather(pypungi.PungiBase):
|
|||||||
except yum.Errors.RepoMDError, e:
|
except yum.Errors.RepoMDError, e:
|
||||||
self.logger.warn("No group data found for %s" % repo.id)
|
self.logger.warn("No group data found for %s" % repo.id)
|
||||||
pass
|
pass
|
||||||
|
else:
|
||||||
|
# Check to see if we got a gzipped comps file
|
||||||
|
if groupfile.endswith('.gz'):
|
||||||
|
compslines = gzip.open(groupfile, 'r').readlines()
|
||||||
else:
|
else:
|
||||||
compslines = open(groupfile, 'r').readlines()
|
compslines = open(groupfile, 'r').readlines()
|
||||||
for line in compslines:
|
for line in compslines:
|
||||||
|
Loading…
Reference in New Issue
Block a user