This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Drekin, Robert.Tasarz, python-dev, r.david.murray, vstinner
Date 2013-08-23.15:12:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1377270755.93.0.20764058069.issue17702@psf.upfronthosting.co.za>
In-reply-to
Content
"This patch introduces a bit ugly traceback. Shouldn't there be “raise from None” or “raise from previous_exc” instead of simple raise?"

Oh, I see.

>>> os.environb[b'10']
Traceback (most recent call last):
  File "/home/vstinner/prog/python/default/Lib/os.py", line 648, in __getitem__
    value = self._data[self.encodekey(key)]
KeyError: b'10'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vstinner/prog/python/default/Lib/os.py", line 651, in __getitem__
    raise KeyError(key)
KeyError: b'10'

Attached patch adds "from None".
History
Date User Action Args
2013-08-23 15:12:36vstinnersetrecipients: + vstinner, r.david.murray, python-dev, Drekin, Robert.Tasarz
2013-08-23 15:12:35vstinnersetmessageid: <1377270755.93.0.20764058069.issue17702@psf.upfronthosting.co.za>
2013-08-23 15:12:35vstinnerlinkissue17702 messages
2013-08-23 15:12:35vstinnercreate