diff options
Diffstat (limited to 'bitbake/lib/bb/__init__.py')
-rw-r--r-- | bitbake/lib/bb/__init__.py | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/bitbake/lib/bb/__init__.py b/bitbake/lib/bb/__init__.py index dabe978bf5..c6c0beb792 100644 --- a/bitbake/lib/bb/__init__.py +++ b/bitbake/lib/bb/__init__.py | |||
@@ -23,7 +23,7 @@ this program; if not, write to the Free Software Foundation, Inc., 59 Temple | |||
23 | Place, Suite 330, Boston, MA 02111-1307 USA. | 23 | Place, Suite 330, Boston, MA 02111-1307 USA. |
24 | """ | 24 | """ |
25 | 25 | ||
26 | __version__ = "1.3.3.0" | 26 | __version__ = "1.3.3.4" |
27 | 27 | ||
28 | __all__ = [ | 28 | __all__ = [ |
29 | 29 | ||
@@ -1229,38 +1229,6 @@ class digraph: | |||
1229 | mygraph.okeys=self.okeys[:] | 1229 | mygraph.okeys=self.okeys[:] |
1230 | return mygraph | 1230 | return mygraph |
1231 | 1231 | ||
1232 | ####################################################################### | ||
1233 | ####################################################################### | ||
1234 | # | ||
1235 | # SECTION: Config | ||
1236 | # | ||
1237 | # PURPOSE: Reading and handling of system/target-specific/local configuration | ||
1238 | # reading of package configuration | ||
1239 | # | ||
1240 | ####################################################################### | ||
1241 | ####################################################################### | ||
1242 | |||
1243 | def reader(cfgfile, feeder): | ||
1244 | """Generic configuration file reader that opens a file, reads the lines, | ||
1245 | handles continuation lines, comments, empty lines and feed all read lines | ||
1246 | into the function feeder(lineno, line). | ||
1247 | """ | ||
1248 | |||
1249 | f = open(cfgfile,'r') | ||
1250 | lineno = 0 | ||
1251 | while 1: | ||
1252 | lineno = lineno + 1 | ||
1253 | s = f.readline() | ||
1254 | if not s: break | ||
1255 | w = s.strip() | ||
1256 | if not w: continue # skip empty lines | ||
1257 | s = s.rstrip() | ||
1258 | if s[0] == '#': continue # skip comments | ||
1259 | while s[-1] == '\\': | ||
1260 | s2 = f.readline()[:-1].strip() | ||
1261 | s = s[:-1] + s2 | ||
1262 | feeder(lineno, s) | ||
1263 | |||
1264 | if __name__ == "__main__": | 1232 | if __name__ == "__main__": |
1265 | import doctest, bb | 1233 | import doctest, bb |
1266 | doctest.testmod(bb) | 1234 | doctest.testmod(bb) |