187 |
187 |
188 # search the path for the file |
188 # search the path for the file |
189 f = None |
189 f = None |
190 fullpath = list(path) |
190 fullpath = list(path) |
191 f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) |
191 f, file, (suff, mode, type) = ClassBrowsers.find_module(module, fullpath) |
|
192 if f: |
|
193 f.close() |
192 if type not in SUPPORTED_TYPES: |
194 if type not in SUPPORTED_TYPES: |
193 # not CORBA IDL source, can't do anything with this module |
195 # not CORBA IDL source, can't do anything with this module |
194 f.close() |
|
195 _modules[module] = dict |
196 _modules[module] = dict |
196 return dict |
197 return dict |
197 |
198 |
198 _modules[module] = dict |
199 _modules[module] = dict |
199 classstack = [] # stack of (class, indent) pairs |
200 classstack = [] # stack of (class, indent) pairs |
200 indent = 0 |
201 indent = 0 |
201 src = f.read() |
202 try: |
202 f.close() |
203 src = Utilities.readEncodedFile(file)[0] |
|
204 except (UnicodeError, IOError): |
|
205 # can't do anything with this module |
|
206 _modules[module] = dict |
|
207 return dict |
203 |
208 |
204 lineno, last_lineno_pos = 1, 0 |
209 lineno, last_lineno_pos = 1, 0 |
205 i = 0 |
210 i = 0 |
206 while True: |
211 while True: |
207 m = _getnext(src, i) |
212 m = _getnext(src, i) |