Don't use flavor for a log file if no flavor set (Trac #48)

This commit is contained in:
Jesse Keating 2007-06-13 18:03:29 -04:00 committed by Jesse Keating
parent a5fdee3d55
commit 51b7c6d81a
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,6 @@
* Wed Jun 13 2007 Jesse Keating <jkeating@redhat.com>
- Don't use flavor for a log file if no flavor set (Trac #48)
* Mon Jun 11 2007 Jesse Keating <jkeating@redhat.com> * Mon Jun 11 2007 Jesse Keating <jkeating@redhat.com>
- Add a install target to make (Trac #37) - Add a install target to make (Trac #37)
- Enable the source repo in yum configs (Trac #47) - Enable the source repo in yum configs (Trac #47)

View File

@ -65,8 +65,12 @@ class Gather(yum.YumBase):
logdir = os.path.join(self.config.get('default', 'destdir'), 'logs') logdir = os.path.join(self.config.get('default', 'destdir'), 'logs')
if not os.path.exists(logdir): if not os.path.exists(logdir):
os.makedirs(logdir) os.makedirs(logdir)
if self.config.get('default', 'flavor'):
logfile = os.path.join(logdir, '%s.%s.log' % (self.config.get('default', 'flavor'), logfile = os.path.join(logdir, '%s.%s.log' % (self.config.get('default', 'flavor'),
self.config.get('default', 'arch'))) self.config.get('default', 'arch')))
else:
logfile = os.path.join(logdir, '%s.log' % (self.config.get('default', 'arch')))
yum.logging.basicConfig(level=yum.logging.DEBUG, filename=logfile) yum.logging.basicConfig(level=yum.logging.DEBUG, filename=logfile)
def doFileLogSetup(self, uid, logfile): def doFileLogSetup(self, uid, logfile):