SVN: Zope/branches/2.12/src/ explicit is better than implicit
Yvo Schubbe <[email protected]> Mon, 14 Nov 2011 11:42:12 -0500 (EST)
| Newsgroups | gmane.comp.web.zope.cvs |
|---|---|
| Message-ID | <20111114164212.143C3941C9__17632.1617713713$1321288938$gmane$org@cvs.zope.org> |
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)
_______________________________________________
Zope-Checkins maillist - [email protected]
https://mail.zope.org/mailman/listinfo/zope-checkins