- Timestamp:
- 11/06/17 01:36:01 (6 years ago)
- Files:
-
- trunk/libffado/admin/doxygen.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/admin/doxygen.py
r864 r2712 44 44 import glob 45 45 from fnmatch import fnmatch 46 from functools import reduce 46 47 47 48 def DoxyfileParse(file_contents): … … 53 54 54 55 import shlex 55 lex = shlex.shlex(instream = file_contents , posix = True)56 lex = shlex.shlex(instream = file_contents.decode(), posix = True) 56 57 lex.wordchars += "*+./-:" 57 58 lex.whitespace = lex.whitespace.replace("\n", "") … … 99 100 100 101 # compress lists of len 1 into single strings 102 to_pop = [] 101 103 for (k, v) in data.items(): 102 104 if len(v) == 0: 103 data.pop(k) 105 # data.pop(k) # Shouldn't modify dictionary while looping 106 to_pop.append(k) 104 107 105 108 # items in the following list will be kept as lists and not converted to strings … … 109 112 if len(v) == 1: 110 113 data[k] = v[0] 114 115 for k in to_pop: 116 data.pop(k) 111 117 112 118 return data