Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
4dc5c3c9
Commit
4dc5c3c9
authored
Dec 31, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factorise class declaration.
parent
c9d67d04
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
product/ERP5Type/Tool/MemcachedTool.py
product/ERP5Type/Tool/MemcachedTool.py
+12
-16
No files found.
product/ERP5Type/Tool/MemcachedTool.py
View file @
4dc5c3c9
...
...
@@ -35,6 +35,16 @@ from Products.ERP5Type.Globals import DTMLFile
from
quopri
import
encodestring
MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID
=
'_v_memcached_edited'
class
_MemcacheTool
(
BaseTool
):
id
=
"portal_memcached"
meta_type
=
"ERP5 Memcached Tool"
portal_type
=
"Memcached Tool"
manage_options
=
(
{
'label'
:
'Configure'
,
'action'
:
'memcached_tool_configure'
,
},
)
+
BaseTool
.
manage_options
try
:
import
memcache
...
...
@@ -281,19 +291,11 @@ if memcache is not None:
allow_class
(
SharedDict
)
class
MemcachedTool
(
Bas
eTool
):
class
MemcachedTool
(
_Memcach
eTool
):
"""
Memcached interface available as a tool.
"""
id
=
"portal_memcached"
meta_type
=
"ERP5 Memcached Tool"
portal_type
=
"Memcached Tool"
security
=
ClassSecurityInfo
()
manage_options
=
({
'label'
:
'Configure'
,
'action'
:
'memcached_tool_configure'
,
},)
+
BaseTool
.
manage_options
memcached_tool_configure
=
DTMLFile
(
'memcached_tool_configure'
,
_dtmldir
)
erp5_site_global_id
=
''
...
...
@@ -339,19 +341,13 @@ if memcache is not None:
else
:
# Placeholder memcache tool
class
MemcachedTool
(
Base
Tool
):
class
MemcachedTool
(
_Memcached
Tool
):
"""
Dummy MemcachedTool placeholder.
"""
id
=
"portal_memcached"
meta_type
=
"ERP5 Memcached Tool"
portal_type
=
"Memcached Tool"
title
=
"DISABLED"
security
=
ClassSecurityInfo
()
manage_options
=
({
'label'
:
'Configure'
,
'action'
:
'memcached_tool_configure'
,
},)
+
BaseTool
.
manage_options
def
failingMethod
(
self
,
*
args
,
**
kw
):
"""
...
...
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