jhbuild r2365 - in trunk: . jhbuild
- From: fpeters svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2365 - in trunk: . jhbuild
- Date: Fri, 19 Sep 2008 08:30:55 +0000 (UTC)
Author: fpeters
Date: Fri Sep 19 08:30:54 2008
New Revision: 2365
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2365&view=rev
Log:
* jhbuild/config.py: notify user (unless quiet mode is set) of unknown
configuration variables (so a typo (eg make_flags) is easily spotted).
Modified:
trunk/ChangeLog
trunk/jhbuild/config.py
Modified: trunk/jhbuild/config.py
==============================================================================
--- trunk/jhbuild/config.py (original)
+++ trunk/jhbuild/config.py Fri Sep 19 08:30:54 2008
@@ -19,8 +19,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
import os
-import traceback
import sys
+import traceback
+import types
from jhbuild.errors import UsageError, FatalError, CommandError
from jhbuild.utils.cmds import get_output
@@ -109,6 +110,21 @@
traceback.print_exc()
raise FatalError(_('could not load config file'))
+ if not config.get('quiet_mode'):
+ unknown_keys = []
+ for k in config.keys():
+ if k in _known_keys + ['cvsroots', 'svnroots', 'cflags']:
+ continue
+ if k[0] == '_':
+ continue
+ if type(config[k]) in (types.ModuleType, types.FunctionType):
+ continue
+ unknown_keys.append(k)
+ if unknown_keys:
+ print >> sys.stderr, uencode(
+ _('I: unknown keys defined in configuration file: %s') % \
+ ', '.join(unknown_keys))
+
# backward compatibility, from the days when jhbuild only
# supported Gnome.org CVS.
if config.has_key('cvsroot'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]