Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
6b044a79
Commit
6b044a79
authored
Mar 11, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unused code
parent
6bb04613
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
33 deletions
+1
-33
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
+1
-33
No files found.
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
View file @
6b044a79
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
##############################################################################
##############################################################################
__version__
=
'$Id: FilteredSet.py,v 1.
2 2002/02/28 15:31:41
andreasjung Exp $'
__version__
=
'$Id: FilteredSet.py,v 1.
3 2002/03/11 14:53:05
andreasjung Exp $'
from
BTrees.IIBTree
import
IISet
from
BTrees.IIBTree
import
IISet
from
Persistence
import
Persistent
from
Persistence
import
Persistent
...
@@ -55,25 +55,6 @@ class FilteredSetBase(Persistent):
...
@@ -55,25 +55,6 @@ class FilteredSetBase(Persistent):
class
AttributeFilteredSet
(
FilteredSetBase
):
""" The implementation of this FS is currently nonsense """
meta_type
=
'AttributeFilteredSet'
def
index_object
(
self
,
documentId
,
o
):
if
hasattr
(
o
,
self
.
id
):
attr
=
getattr
(
o
,
self
.
id
)
if
callable
(
attr
):
attr
=
attr
()
try
:
if
attr
in
eval
(
self
.
expr
):
self
.
ids
.
insert
(
documentId
)
except
:
pass
class
PythonFilteredSet
(
FilteredSetBase
):
class
PythonFilteredSet
(
FilteredSetBase
):
meta_type
=
'PythonFilteredSet'
meta_type
=
'PythonFilteredSet'
...
@@ -88,13 +69,6 @@ class PythonFilteredSet(FilteredSetBase):
...
@@ -88,13 +69,6 @@ class PythonFilteredSet(FilteredSetBase):
sys
.
exc_info
())
sys
.
exc_info
())
class
CatalogFilteredSet
(
FilteredSetBase
):
meta_type
=
'CatalogFilteredSet'
def
index_object
(
self
,
documentId
,
obj
):
raise
RuntimeError
,
'not implemented yet'
def
factory
(
f_id
,
f_type
,
expr
):
def
factory
(
f_id
,
f_type
,
expr
):
""" factory function for FilteredSets """
""" factory function for FilteredSets """
...
@@ -102,11 +76,5 @@ def factory(f_id, f_type, expr):
...
@@ -102,11 +76,5 @@ def factory(f_id, f_type, expr):
if
f_type
==
'PythonFilteredSet'
:
if
f_type
==
'PythonFilteredSet'
:
return
PythonFilteredSet
(
f_id
,
expr
)
return
PythonFilteredSet
(
f_id
,
expr
)
elif
f_type
==
'AttributeFilteredSet'
:
return
AttributeFilteredSet
(
f_id
,
expr
)
elif
f_type
==
'CatalogFilteredSet'
:
return
CatalogFilteredSet
(
f_id
,
expr
)
else
:
else
:
raise
TypeError
,
'unknown type for FilteredSets: %s'
%
f_type
raise
TypeError
,
'unknown type for FilteredSets: %s'
%
f_type
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