Always use the discinfo file from the exploaded tree. It doesn't change. Also, close the file when we're done.

This commit is contained in:
Jesse Keating 2008-01-21 17:13:54 -05:00 committed by Jesse Keating
parent 7de5f15356
commit bbbcc1dff8
1 changed files with 2 additions and 4 deletions

View File

@ -312,11 +312,9 @@ class Pungi(pypungi.PungiBase):
"""Create the split metadata for the isos"""
if self.config.getint('default', 'discs') > 1:
discinfo = open('%s-disc1/.discinfo' % self.topdir, 'r').readlines()
else:
discinfo = open(os.path.join(self.topdir, '.discinfo'), 'r').readlines()
discinfo = open(os.path.join(self.topdir, '.discinfo'), 'r').readlines()
mediaid = discinfo[0].rstrip('\n')
discinfo.close()
compsfile = os.path.join(self.workdir, '%s-%s-comps.xml' % (self.config.get('default', 'name'), self.config.get('default', 'version')))