Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
d19753d0
Commit
d19753d0
authored
Jun 12, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove some iHotFix references
parent
73594d3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
31 deletions
+5
-31
product/CMFActivity/ActivityTool.py
product/CMFActivity/ActivityTool.py
+4
-11
product/ERP5Type/tests/ERP5TypeTestCase.py
product/ERP5Type/tests/ERP5TypeTestCase.py
+1
-20
No files found.
product/CMFActivity/ActivityTool.py
View file @
d19753d0
...
...
@@ -57,17 +57,10 @@ from Zope2 import app
from
Products.ERP5Type.UnrestrictedMethod
import
PrivilegedUser
from
zope.site.hooks
import
setSite
try
:
from
Products
import
iHotfix
localizer_lock
=
iHotfix
.
_the_lock
localizer_contexts
=
iHotfix
.
contexts
LocalizerContext
=
iHotfix
.
Context
except
ImportError
:
# Localizer 1.2 includes iHotFix patches
import
Products.Localizer.patches
localizer_lock
=
Products
.
Localizer
.
patches
.
_requests_lock
localizer_contexts
=
Products
.
Localizer
.
patches
.
_requests
LocalizerContext
=
lambda
request
:
request
import
Products.Localizer.patches
localizer_lock
=
Products
.
Localizer
.
patches
.
_requests_lock
localizer_contexts
=
Products
.
Localizer
.
patches
.
_requests
LocalizerContext
=
lambda
request
:
request
from
ZODB.POSException
import
ConflictError
...
...
product/ERP5Type/tests/ERP5TypeTestCase.py
View file @
d19753d0
...
...
@@ -77,28 +77,9 @@ config.product_config['deadlockdebugger'] = {'dump_url':'/manage_debug_threads'}
from
Testing.ZopeTestCase.layer
import
onsetup
try
:
# Workaround iHotFix patch that doesn't work with
# ZopeTestCase REQUESTs
from
Products
import
iHotfix
from
types
import
UnicodeType
# revert monkey patchs from iHotfix
iHotfix
.
get_request
=
get_request
originalStringIO
=
iHotfix
.
originalStringIO
class
UnicodeSafeStringIO
(
originalStringIO
):
"""StringIO like class which never fails with unicode."""
def
write
(
self
,
s
):
if
isinstance
(
s
,
UnicodeType
):
s
=
s
.
encode
(
'utf8'
,
'repr'
)
originalStringIO
.
write
(
self
,
s
)
# iHotFix will patch PageTemplate StringIO with
iHotfix
.
iHotfixStringIO
=
UnicodeSafeStringIO
except
ImportError
:
pass
try
:
# Workaround Localizer >= 1.2 patch that doesn't work with
# ZopeTestCase REQUESTs
(it's the same as iHotFix
# ZopeTestCase REQUESTs
from
Products.Localizer
import
patches
,
utils
# revert monkey patches from Localizer
patches
.
get_request
=
get_request
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment