File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -617,10 +617,6 @@ IsolationLevel=PROCESS # Also weakref failures; https://github.com/IronLanguages
617617[CPython.test_metaclass]
618618Ignore =true
619619
620- [CPython.test_mimetypes]
621- Ignore =true
622- Reason =StackOverflowException - https://github.com/IronLanguages/ironpython2/issues/182
623-
624620[CPython.test_mmap]
625621RunCondition =NOT $(IS_POSIX)
626622IsolationLevel =PROCESS
Original file line number Diff line number Diff line change @@ -252,19 +252,21 @@ def enum_types(mimedb):
252252
253253 with _winreg .OpenKey (_winreg .HKEY_CLASSES_ROOT , '' ) as hkcr :
254254 for subkeyname in enum_types (hkcr ):
255- try :
256- with _winreg .OpenKey (hkcr , subkeyname ) as subkey :
257- # Only check file extensions
258- if not subkeyname .startswith ("." ):
259- continue
255+ # ironpython: code modified to avoid StackOverflowException - https://github.com/IronLanguages/ironpython3/issues/1182
256+ with _winreg .OpenKey (hkcr , subkeyname ) as subkey :
257+ # Only check file extensions
258+ if not subkeyname .startswith ("." ):
259+ continue
260+ try :
260261 # raises EnvironmentError if no 'Content Type' value
261262 mimetype , datatype = _winreg .QueryValueEx (
262263 subkey , 'Content Type' )
264+ except EnvironmentError :
265+ pass
266+ else :
263267 if datatype != _winreg .REG_SZ :
264268 continue
265269 self .add_type (mimetype , subkeyname , strict )
266- except EnvironmentError :
267- continue
268270
269271def guess_type (url , strict = True ):
270272 """Guess the type of a file based on its URL.
You can’t perform that action at this time.
0 commit comments