[Zope-Checkins] SVN: Zope/branches/2.12/src/ explicit is better than implicit
Yvo Schubbe
y.2011 at wcm-solutions.de
Mon Nov 14 16:42:12 UTC 2011
Log message for revision 123341:
explicit is better than implicit
Changed:
U Zope/branches/2.12/src/OFS/Image.py
U Zope/branches/2.12/src/webdav/LockItem.py
-=-
Modified: Zope/branches/2.12/src/OFS/Image.py
===================================================================
--- Zope/branches/2.12/src/OFS/Image.py 2011-11-14 16:41:37 UTC (rev 123340)
+++ Zope/branches/2.12/src/OFS/Image.py 2011-11-14 16:42:11 UTC (rev 123341)
@@ -36,7 +36,6 @@
from webdav.Lockable import ResourceLockedError
from ZPublisher import HTTPRangeSupport
from ZPublisher.HTTPRequest import FileUpload
-from ZPublisher.Iterators import filestream_iterator
from zExceptions import Redirect
from zope.contenttype import guess_content_type
from zope.interface import implementedBy
@@ -657,6 +656,9 @@
return ''
+InitializeClass(File)
+
+
manage_addImageForm=DTMLFile('dtml/imageAdd',globals(),
Kind='Image',kind='image')
def manage_addImage(self, id, file, title='', precondition='', content_type='',
@@ -898,7 +900,9 @@
return '%s />' % result
+InitializeClass(Image)
+
def cookId(id, title, file):
if not id and hasattr(file,'filename'):
filename=file.filename
Modified: Zope/branches/2.12/src/webdav/LockItem.py
===================================================================
--- Zope/branches/2.12/src/webdav/LockItem.py 2011-11-14 16:41:37 UTC (rev 123340)
+++ Zope/branches/2.12/src/webdav/LockItem.py 2011-11-14 16:42:11 UTC (rev 123341)
@@ -19,6 +19,7 @@
from AccessControl.Owned import ownerInfo
from AccessControl.SecurityInfo import ClassSecurityInfo
+from App.class_init import InitializeClass
from Persistence import Persistent
from zope.interface import implements
@@ -173,7 +174,6 @@
return s
def asXML(self):
-
s = """<?xml version="1.0" encoding="utf-8" ?>
<d:prop xmlns:d="DAV:">
<d:lockdiscovery>
@@ -181,3 +181,5 @@
</d:lockdiscovery>
</d:prop>""" % self.asLockDiscoveryProperty(ns="d")
return s
+
+InitializeClass(LockItem)
More information about the Zope-Checkins
mailing list