mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 20:23:45 +03:00
(App.ImageFile): simplify ImageFile import using patch from
chrism, fixing bug #198.
This commit is contained in:
parent
6d9b6a977c
commit
abb0a6f52c
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
* ZPsycopgDA/DA.py (Connection.__init__): Default the encoding to
|
* ZPsycopgDA/DA.py (Connection.__init__): Default the encoding to
|
||||||
UTF-8, fixing bug #190.
|
UTF-8, fixing bug #190.
|
||||||
|
(App.ImageFile): simplify ImageFile import using patch from
|
||||||
|
chrism, fixing bug #198.
|
||||||
|
|
||||||
2008-01-16 James Henstridge <james@jamesh.id.au>
|
2008-01-16 James Henstridge <james@jamesh.id.au>
|
||||||
|
|
||||||
|
|
|
@ -34,19 +34,13 @@ from ExtensionClass import Base
|
||||||
from App.Dialogs import MessageDialog
|
from App.Dialogs import MessageDialog
|
||||||
from DateTime import DateTime
|
from DateTime import DateTime
|
||||||
|
|
||||||
# Build Zope version in a float for later cheks
|
|
||||||
import App
|
|
||||||
zope_version = App.version_txt.getZopeVersion()
|
|
||||||
if zope_version[1] == -1:
|
|
||||||
zope_version = None
|
|
||||||
else:
|
|
||||||
zope_version = float("%s.%s" %(zope_version[:2]))
|
|
||||||
|
|
||||||
# ImageFile is deprecated in Zope >= 2.9
|
# ImageFile is deprecated in Zope >= 2.9
|
||||||
if zope_version is not None and zope_version < 2.9:
|
try:
|
||||||
from ImageFile import ImageFile
|
from App.ImageFile import ImageFile
|
||||||
else:
|
except ImportError:
|
||||||
from App.ImageFile import ImageFile
|
# Zope < 2.9. If PIL's installed with a .pth file, we're probably
|
||||||
|
# hosed.
|
||||||
|
from ImageFile import ImageFile
|
||||||
|
|
||||||
# import psycopg and functions/singletons needed for date/time conversions
|
# import psycopg and functions/singletons needed for date/time conversions
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user