mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-11-04 01:37:31 +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
 | 
			
		||||
	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>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -34,19 +34,13 @@ from ExtensionClass import Base
 | 
			
		|||
from App.Dialogs import MessageDialog
 | 
			
		||||
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
 | 
			
		||||
if zope_version is not None and zope_version < 2.9:
 | 
			
		||||
     from ImageFile import ImageFile
 | 
			
		||||
else:
 | 
			
		||||
try:
 | 
			
		||||
    from App.ImageFile import ImageFile
 | 
			
		||||
except ImportError:
 | 
			
		||||
    # 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
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user