fix import: stop deprecation warning
This commit is contained in:
		
							parent
							
								
									61a146a43d
								
							
						
					
					
						commit
						522e40f242
					
				
					 3 changed files with 6 additions and 2 deletions
				
			
		|  | @ -27,11 +27,11 @@ from zope.app.container.interfaces import IAdding | ||||||
| from zope.app.security.interfaces import IAuthentication, PrincipalLookupError | from zope.app.security.interfaces import IAuthentication, PrincipalLookupError | ||||||
| from zope.cachedescriptors.property import Lazy | from zope.cachedescriptors.property import Lazy | ||||||
| from zope.component import adapts | from zope.component import adapts | ||||||
| from zope.component.interfaces import ObjectEvent |  | ||||||
| from zope.dublincore.interfaces import IZopeDublinCore | from zope.dublincore.interfaces import IZopeDublinCore | ||||||
| from zope.event import notify | from zope.event import notify | ||||||
| from zope.interface import implements | from zope.interface import implements | ||||||
| from zope.interface import alsoProvides, directlyProvides, directlyProvidedBy | from zope.interface import alsoProvides, directlyProvides, directlyProvidedBy | ||||||
|  | from zope.interface.interfaces import ObjectEvent | ||||||
| from zope.publisher.interfaces.browser import IBrowserRequest | from zope.publisher.interfaces.browser import IBrowserRequest | ||||||
| from zope.security.proxy import removeSecurityProxy, isinstance | from zope.security.proxy import removeSecurityProxy, isinstance | ||||||
| from zope.traversing.api import getName, getParent | from zope.traversing.api import getName, getParent | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ from zope.schema._bootstrapinterfaces import StopValidation | ||||||
| from zope.app.container.constraints import contains, containers | from zope.app.container.constraints import contains, containers | ||||||
| from zope.app.container.interfaces import IContainer, IOrderedContainer | from zope.app.container.interfaces import IContainer, IOrderedContainer | ||||||
| from zope.app.file.interfaces import IImage as IBaseAsset | from zope.app.file.interfaces import IImage as IBaseAsset | ||||||
| from zope.component.interfaces import IObjectEvent | from zope.interface.interfaces import IObjectEvent | ||||||
| from zope.size.interfaces import ISized | from zope.size.interfaces import ISized | ||||||
| 
 | 
 | ||||||
| from cybertools.composer.schema.interfaces import FieldType | from cybertools.composer.schema.interfaces import FieldType | ||||||
|  |  | ||||||
|  | @ -68,6 +68,8 @@ workspaceGroupsFolderName = 'gloops_ws' | ||||||
| 
 | 
 | ||||||
| # checking and querying functions | # checking and querying functions | ||||||
| 
 | 
 | ||||||
|  | # TODO: activate canAccessObjectWithOption depending on custom.config | ||||||
|  | 
 | ||||||
| def getOption(obj, option, checkType=True): | def getOption(obj, option, checkType=True): | ||||||
|     opts = component.queryAdapter(adapted(obj), IOptions) |     opts = component.queryAdapter(adapted(obj), IOptions) | ||||||
|     if opts is not None: |     if opts is not None: | ||||||
|  | @ -75,6 +77,7 @@ def getOption(obj, option, checkType=True): | ||||||
|         if opt is True: |         if opt is True: | ||||||
|             return opt |             return opt | ||||||
|         if opt: |         if opt: | ||||||
|  |             # TODO: log | ||||||
|             return opt[0] |             return opt[0] | ||||||
|     if not checkType: |     if not checkType: | ||||||
|         return None |         return None | ||||||
|  | @ -86,6 +89,7 @@ def getOption(obj, option, checkType=True): | ||||||
|             if opt is True: |             if opt is True: | ||||||
|                 return opt |                 return opt | ||||||
|             if opt: |             if opt: | ||||||
|  |                 # TODO: log | ||||||
|                 return opt[0] |                 return opt[0] | ||||||
|     return None |     return None | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue