Loading django/views/debug.py +13 −9 Original line number Diff line number Diff line Loading @@ -354,6 +354,10 @@ class ExceptionReporter(object): if source is None: return None, [], None, [] # If we just read the source from a file, or if the loader did not # apply tokenize.detect_encoding to decode the source into a Unicode # string, then we should do that ourselves. if isinstance(source[0], six.binary_type): encoding = 'ascii' for line in source[:2]: # File coding may be specified. Match pattern from PEP-263 Loading Loading
django/views/debug.py +13 −9 Original line number Diff line number Diff line Loading @@ -354,6 +354,10 @@ class ExceptionReporter(object): if source is None: return None, [], None, [] # If we just read the source from a file, or if the loader did not # apply tokenize.detect_encoding to decode the source into a Unicode # string, then we should do that ourselves. if isinstance(source[0], six.binary_type): encoding = 'ascii' for line in source[:2]: # File coding may be specified. Match pattern from PEP-263 Loading