Better patch:
@@ -264,7 +264,7 @@ def main(retParams):
log_cfg = ConfigParser.ConfigParser()
logging.config.fileConfig(log_ini)
log_cfg.read(log_ini)
- except (IOError, OSError), e:
+ except (IOError, OSError, ConfigParser.NoSectionError), e:
log.error("Could not find required logging config file: %s" % log_ini)
sys.exit(50)
About branching:
If they ever upgrade
fedoraproject.org to a non-ancient version of git, that would be
fine. With git >= 1.5, you can delete remote branches. With older git, there is no way
to remove a remote branch.
Are there any other changes you are needing for cross-building?
--
Michael
-----Original Message-----
From: Clark Williams [mailto:williams@redhat.com]
Sent: Fri 11/16/2007 9:03 AM
To: Brown, Michael E
Subject: potential patch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael,
I'm porting our cross-build environment to use the new mock (0.8.8+) and ran into a
small issues. Evidently the ConfigParser stuff doesn't barf if the input configfile
doesn't exist, so you get a very strange error about "no formatters section
exists"
or something similar.
What do you think of the change below?
I'm still struggling with how I should push these sorts of changes back to the main
git repo. I wonder if we shouldn't have michael,clark, and jessie branches up there
so we could just push to that for review then merge to master? Dunno...
Clark
- From 5add76128fcc10555264392307d5da998a05401b Mon Sep 17 00:00:00 2001
From: Clark Williams <williams(a)redhat.com>
Date: Thu, 15 Nov 2007 09:20:01 -0600
Subject: [PATCH] fix for no logging.ini situation
- ---
src/mock.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/mock.py b/src/mock.py
index 08832dd..9954dcf 100755
- --- a/src/mock.py
+++ b/src/mock.py
@@ -260,12 +260,15 @@ def main(retParams):
# reconfigure logging in case config file was overridden
log_ini = os.path.join(config_path, config_opts["log_config_file"])
+ if not os.path.exists(log_ini):
+ log.error("Could not find required logging config file: %s" % log_ini)
+ sys.exit(50)
try:
log_cfg = ConfigParser.ConfigParser()
logging.config.fileConfig(log_ini)
log_cfg.read(log_ini)
except (IOError, OSError), e:
- - log.error("Could not find required logging config file: %s" %
log_ini)
+ log.error("Error configuring logging: %s" % e)
sys.exit(50)
# set up logging format strings
- --
1.5.3.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora -
http://enigmail.mozdev.org
iD8DBQFHPbFJHyuj/+TTEp0RAga1AJ0ddE0ReUVdJpqGwSIHuFQqmhimEACgpej2
WX/yAWX3mo+J7GoS20t9JLg=
=OQg0
-----END PGP SIGNATURE-----