Commit c98ca6b2 authored by Tres Seaver's avatar Tres Seaver

Launchpad #373299: Removed bogus string exception in OFS.CopySupport.

parent 27f6a155
...@@ -8,6 +8,8 @@ Zope Changes ...@@ -8,6 +8,8 @@ Zope Changes
Bugs fixed Bugs fixed
- Launchpad #373299: Removed bogus string exception in OFS.CopySupport.
- Launchpad ##332168: Connection.py: do not expose DB connection strings - Launchpad ##332168: Connection.py: do not expose DB connection strings
through exceptions through exceptions
......
...@@ -44,7 +44,8 @@ from OFS.interfaces import ICopyContainer ...@@ -44,7 +44,8 @@ from OFS.interfaces import ICopyContainer
from OFS.interfaces import ICopySource from OFS.interfaces import ICopySource
CopyError='Copy Error' class CopyError(Exception):
pass
copy_re = re.compile('^copy([0-9]*)_of_(.*)') copy_re = re.compile('^copy([0-9]*)_of_(.*)')
......
...@@ -347,7 +347,7 @@ class TestCopySupportSecurity( CopySupportTestBase ): ...@@ -347,7 +347,7 @@ class TestCopySupportSecurity( CopySupportTestBase ):
if ce_regex is not None: if ce_regex is not None:
pattern = re.compile( ce_regex, re.DOTALL ) pattern = re.compile( ce_regex, re.DOTALL )
if pattern.search( e ) is None: if pattern.search(str(e)) is None:
self.fail( "Paste failed; didn't match pattern:\n%s" % e ) self.fail( "Paste failed; didn't match pattern:\n%s" % e )
else: else:
...@@ -418,8 +418,6 @@ class TestCopySupportSecurity( CopySupportTestBase ): ...@@ -418,8 +418,6 @@ class TestCopySupportSecurity( CopySupportTestBase ):
def test_copy_cant_create_target_metatype_not_supported( self ): def test_copy_cant_create_target_metatype_not_supported( self ):
from OFS.CopySupport import CopyError
folder1, folder2 = self._initFolders() folder1, folder2 = self._initFolders()
folder2.all_meta_types = () folder2.all_meta_types = ()
...@@ -449,8 +447,6 @@ class TestCopySupportSecurity( CopySupportTestBase ): ...@@ -449,8 +447,6 @@ class TestCopySupportSecurity( CopySupportTestBase ):
def test_move_cant_read_source( self ): def test_move_cant_read_source( self ):
from OFS.CopySupport import CopyError
folder1, folder2 = self._initFolders() folder1, folder2 = self._initFolders()
folder2.all_meta_types = FILE_META_TYPES folder2.all_meta_types = FILE_META_TYPES
...@@ -469,8 +465,6 @@ class TestCopySupportSecurity( CopySupportTestBase ): ...@@ -469,8 +465,6 @@ class TestCopySupportSecurity( CopySupportTestBase ):
def test_move_cant_create_target_metatype_not_supported( self ): def test_move_cant_create_target_metatype_not_supported( self ):
from OFS.CopySupport import CopyError
folder1, folder2 = self._initFolders() folder1, folder2 = self._initFolders()
folder2.all_meta_types = () folder2.all_meta_types = ()
...@@ -484,8 +478,6 @@ class TestCopySupportSecurity( CopySupportTestBase ): ...@@ -484,8 +478,6 @@ class TestCopySupportSecurity( CopySupportTestBase ):
def test_move_cant_create_target_metatype_not_allowed( self ): def test_move_cant_create_target_metatype_not_allowed( self ):
from OFS.CopySupport import CopyError
folder1, folder2 = self._initFolders() folder1, folder2 = self._initFolders()
folder2.all_meta_types = FILE_META_TYPES folder2.all_meta_types = FILE_META_TYPES
...@@ -503,7 +495,6 @@ class TestCopySupportSecurity( CopySupportTestBase ): ...@@ -503,7 +495,6 @@ class TestCopySupportSecurity( CopySupportTestBase ):
def test_move_cant_delete_source( self ): def test_move_cant_delete_source( self ):
from OFS.CopySupport import CopyError
from AccessControl.Permissions import delete_objects as DeleteObjects from AccessControl.Permissions import delete_objects as DeleteObjects
folder1, folder2 = self._initFolders() folder1, folder2 = self._initFolders()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment