This repository has been archived by the owner on Oct 21, 2018. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying to surpress annoying ioerror-request-data-read-error
- Loading branch information
David Burke
committed
Jun 13, 2013
1 parent
3986c7b
commit 75e09ac
Showing
3 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import sys, traceback | ||
|
||
class SuppressUnreadablePost(object): | ||
def filter(self, record): | ||
_, exception, tb = sys.exc_info() | ||
if isinstance(exception, IOError): | ||
for _, _, function, _ in traceback.extract_tb(tb): | ||
if function == '_get_raw_post_data': | ||
return False | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters