From 2f04ee5e48da9963a4911b0d32b0b555744f7ac9 Mon Sep 17 00:00:00 2001 From: Eric Soroos Date: Thu, 2 Nov 2017 21:29:06 +0000 Subject: [PATCH] whitespace tuple --- PIL/PpmImagePlugin.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/PIL/PpmImagePlugin.py b/PIL/PpmImagePlugin.py index dd6be3106..be68d1b40 100644 --- a/PIL/PpmImagePlugin.py +++ b/PIL/PpmImagePlugin.py @@ -24,16 +24,7 @@ __version__ = "0.2" # # -------------------------------------------------------------------- -b_whitespace = string.whitespace.strip() -try: - import locale - locale_lang, locale_enc = locale.getlocale() - if locale_enc is None: - locale_lang, locale_enc = locale.getdefaultlocale() - b_whitespace = b_whitespace.decode(locale_enc) -except: - pass -b_whitespace = b_whitespace.encode('ascii', 'ignore') +b_whitespace = b'\x20\x09\x0a\x0b\x0c\x0d' MODES = { # standard