mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-04 19:57:16 +00:00
Workaround for PIL's ambiguious import method and/or easy_install PIL packaging problem.
PIL documents two different way to import it's modules: * import Image (http://www.pythonware.com/library/pil/handbook/introduction.htm) * from PIL import Image (http://www.pythonware.com/library/pil/handbook/image.htm) The same problem was noted in Django at https://code.djangoproject.com/ticket/6054
This commit is contained in:
parent
75ce5772ea
commit
15c367ffb4
1 changed files with 7 additions and 2 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import re, cStringIO, traceback, json
|
||||
import urwid
|
||||
from PIL import Image
|
||||
from PIL.ExifTags import TAGS
|
||||
|
||||
try: from PIL import Image
|
||||
except ImportError: import Image
|
||||
|
||||
try: from PIL.ExifTags import TAGS
|
||||
except ImportError: from ExifTags import TAGS
|
||||
|
||||
import lxml.html, lxml.etree
|
||||
import netlib.utils
|
||||
import common
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue