Note: Due to technical difficulties, the Archives are currently not up to date.
GMANE provides an alternative service for most mailing lists. c.f. bug 424647
List Archive: gentoo-commits
commit: 30dd2c76ba89169931784493cf326dd691a4a7bc
Author: André Erdmann <dywi <AT> mailerd <DOT> de>
AuthorDate: Wed Jun 6 19:43:22 2012 +0000
Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
CommitDate: Wed Jun 6 19:43:22 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=30dd2c76
roverlay/config.py: fix _add_entry(...)
---
roverlay/config.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/roverlay/config.py b/roverlay/config.py
index 424e69f..6753d4e 100644
--- a/roverlay/config.py
+++ b/roverlay/config.py
@@ -328,7 +328,7 @@ class ConfigTree:
cref_level = 0
# check if cref is a link to another entry in CONFIG_ENTRY_MAP
- while isinstance ( cref, str ):
+ while isinstance ( cref, str ) and cref != '':
if cref == original_cref and cref_level:
self.logger.critical ( "CONFIG_ENTRY_MAP is invalid! circular cref detected." )
raise Exception ( "CONFIG_ENTRY_MAP is invalid!" )
@@ -415,12 +415,13 @@ class ConfigTree:
# load file
try:
+ fh = open ( config_file, 'r' )
+ reader = shlex.shlex ( fh )
reader.wordchars += ' ./$()[]:+-@*~'
- fh = open ( config_file, 'r' )
- reader = shlex.shlex ( fh )
reader.whitespace_split = False
+
nextline = lambda : ( reader.get_token() for n in range (3) )
option, equal, value = nextline ()
|
|