r2561 - in zope-quotafolder/trunk/debian (3 files)
arnau at users.alioth.debian.org
arnau at users.alioth.debian.org
Mon Oct 31 14:28:54 UTC 2011
Date: Monday, October 31, 2011 @ 14:28:53
Author: arnau
Revision: 2561
Add patch for Python 2.6 support
Added:
zope-quotafolder/trunk/debian/patches/python2.6.patch
Modified:
zope-quotafolder/trunk/debian/changelog
zope-quotafolder/trunk/debian/patches/series
Modified: zope-quotafolder/trunk/debian/changelog
===================================================================
--- zope-quotafolder/trunk/debian/changelog 2011-10-31 14:27:25 UTC (rev 2560)
+++ zope-quotafolder/trunk/debian/changelog 2011-10-31 14:28:53 UTC (rev 2561)
@@ -12,7 +12,9 @@
* Update debian/watch.
* Add required build-arch and build-indep rules in debian/rules.
* Add patch for Zope 2.12. Thanks to Gaël Le Mignot.
- + Bump minimum supported version of Zope.
+ + Bump minimum supported version of Zope as it has only been tested
+ with that version so far.
+ * Add patch for Python 2.6 support.
-- Arnaud Fontaine <arnau at debian.org> Sun, 30 Oct 2011 22:22:12 +0900
Added: zope-quotafolder/trunk/debian/patches/python2.6.patch
===================================================================
--- zope-quotafolder/trunk/debian/patches/python2.6.patch (rev 0)
+++ zope-quotafolder/trunk/debian/patches/python2.6.patch 2011-10-31 14:28:53 UTC (rev 2561)
@@ -0,0 +1,56 @@
+Index: zope-quotafolder-0.1.1/QuotaFolder.py
+===================================================================
+--- zope-quotafolder-0.1.1.orig/QuotaFolder.py 2011-10-31 23:25:20.685209978 +0900
++++ zope-quotafolder-0.1.1/QuotaFolder.py 2011-10-31 23:25:33.537210467 +0900
+@@ -36,7 +36,7 @@
+ from Globals import DTMLFile
+ from OFS.Folder import Folder
+ from Acquisition import aq_base, aq_parent, Acquired, Implicit
+-from AccessControl import getSecurityManager, SpecialUsers
++from AccessControl import getSecurityManager, SpecialUsers, Unauthorized
+
+ from zLOG import LOG, WARNING
+
+@@ -71,7 +71,9 @@
+
+ manage_addQuotaFolderForm=DTMLFile('manage_addQuotaFolderForm', globals())
+
+-QuotaExceededException='Quota Exceeded'
++class QuotaExceededException(Exception):
++ def __str__(self):
++ return "Quota Exceeded: %s" % self.args[0]
+
+ class QuotaFolder(Folder, Persistent, Implicit):
+ """ A QuotaFolder """
+@@ -135,19 +137,19 @@
+ self._quota_filecount + filechange > self._quota_objects \
+ > 0:
+ raise QuotaExceededException, \
+- "Too many files, this operation would require a quotum " + \
++ "Too many files, this operation would require a quotum " \
+ "of %d files, your current quotum is %d files" % \
+ (self._quota_filecount + filechange, self._quota_objects)
+ if not emergency and \
+ sizechange > 0 and \
+ self._quota_size + sizechange > self._quota_bytes > 0:
+ raise QuotaExceededException, \
+- "Too much space, this operation would require a " + \
++ "Too much space, this operation would require a " \
+ "quotum of %d bytes, your current quotum is %d bytes" % \
+ (self._quota_size + sizechange, self._quota_bytes)
+ if not emergency and objsize > self._quota_maxsize > 0:
+ raise QuotaExceededException, \
+- "The object is too large. It requires %d bytes, " + \
++ "The object is too large. It requires %d bytes, " \
+ "your maximum object size limit is %d bytes" % \
+ (objsize, self._quota_maxsize)
+
+@@ -220,7 +222,7 @@
+ return ''
+
+ if not self.authorized_to_edit():
+- raise "Unauthorized", \
++ raise Unauthorized, \
+ "You are not authorized to edit this quota folder"
+
+ if quota != -1:
Modified: zope-quotafolder/trunk/debian/patches/series
===================================================================
--- zope-quotafolder/trunk/debian/patches/series 2011-10-31 14:27:25 UTC (rev 2560)
+++ zope-quotafolder/trunk/debian/patches/series 2011-10-31 14:28:53 UTC (rev 2561)
@@ -1 +1,2 @@
zope_2.12.patch
+python2.6.patch
More information about the pkg-zope-developers
mailing list