mirror of
https://github.com/wassname/catalyst.git
synced 2026-09-09 11:19:23 +08:00
BUG: sys.exc_clear is py2 only.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from six import PY2
|
||||
import sys
|
||||
|
||||
|
||||
if PY2:
|
||||
@@ -8,9 +9,17 @@ if PY2:
|
||||
mappingproxy.argtypes = [py_object]
|
||||
mappingproxy.restype = py_object
|
||||
|
||||
def exc_clear():
|
||||
sys.exc_clear()
|
||||
|
||||
else:
|
||||
from types import MappingProxyType as mappingproxy
|
||||
|
||||
def exc_clear():
|
||||
# exc_clear was removed in Python 3. The except statement automatically
|
||||
# clears the exception.
|
||||
pass
|
||||
|
||||
|
||||
unicode = type(u'')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user