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
04227d95
Commit
04227d95
authored
Mar 05, 2005
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- some import cleanup
- fix for collector #1721
parent
aa139459
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
15 deletions
+16
-15
lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
...n/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
+0
-2
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
+0
-1
lib/python/Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py
...Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py
+1
-1
lib/python/Products/PluginIndexes/common/UnIndex.py
lib/python/Products/PluginIndexes/common/UnIndex.py
+15
-11
No files found.
lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
View file @
04227d95
...
...
@@ -15,13 +15,11 @@
"""
import
os
import
sys
from
Products.PluginIndexes
import
PluggableIndex
from
Products.PluginIndexes.common.UnIndex
import
UnIndex
from
Products.PluginIndexes.common.util
import
parseIndexRequest
from
Products.PluginIndexes.common
import
safe_callable
from
OFS.SimpleItem
import
SimpleItem
from
BTrees.IOBTree
import
IOBTree
from
BTrees.IIBTree
import
IISet
,
IITreeSet
,
union
,
intersection
,
multiunion
...
...
lib/python/Products/PluginIndexes/TopicIndex/FilteredSet.py
View file @
04227d95
...
...
@@ -19,7 +19,6 @@ from logging import getLogger
from
ZODB.POSException
import
ConflictError
from
BTrees.IIBTree
import
IITreeSet
from
Persistence
import
Persistent
from
Globals
import
DTMLFile
from
RestrictedPython.Eval
import
RestrictionCapableEval
...
...
lib/python/Products/PluginIndexes/TopicIndex/tests/testTopicIndex.py
View file @
04227d95
...
...
@@ -11,7 +11,7 @@
#
##############################################################################
import
os
,
sys
,
re
,
unittest
import
unittest
import
ZODB
from
Products.PluginIndexes.TopicIndex.TopicIndex
import
TopicIndex
...
...
lib/python/Products/PluginIndexes/common/UnIndex.py
View file @
04227d95
...
...
@@ -16,9 +16,8 @@ $Id$"""
import
sys
from
cgi
import
escape
from
logging
import
getLogger
from
types
import
IntType
,
StringTypes
from
BTrees.OOBTree
import
OOBTree
,
OOSet
from
BTrees.OOBTree
import
OOBTree
from
BTrees.IOBTree
import
IOBTree
from
BTrees.IIBTree
import
IITreeSet
,
IISet
,
union
,
intersection
from
OFS.SimpleItem
import
SimpleItem
...
...
@@ -73,6 +72,14 @@ class UnIndex(SimpleItem):
'caller' -- reference to the calling object (usually
a (Z)Catalog instance
"""
def
_get
(
o
,
k
,
default
):
""" return a value for a given key of a dict/record 'o' """
if
isinstance
(
o
,
dict
):
return
o
.
get
(
k
,
default
)
else
:
return
getattr
(
o
,
k
,
default
)
self
.
id
=
id
self
.
ignore_ex
=
ignore_ex
# currently unimplimented
self
.
call_methods
=
call_methods
...
...
@@ -81,15 +88,12 @@ class UnIndex(SimpleItem):
self
.
useOperator
=
'or'
# allow index to index multiple attributes
try
:
ia
=
extra
[
'indexed_attrs'
]
if
type
(
ia
)
in
StringTypes
:
self
.
indexed_attrs
=
ia
.
split
(
','
)
else
:
self
.
indexed_attrs
=
list
(
ia
)
self
.
indexed_attrs
=
[
attr
.
strip
()
for
attr
in
self
.
indexed_attrs
if
attr
]
or
[
self
.
id
]
except
:
self
.
indexed_attrs
=
[
self
.
id
]
ia
=
_get
(
extra
,
'indexed_attrs'
,
id
)
if
isinstance
(
ia
,
str
):
self
.
indexed_attrs
=
ia
.
split
(
','
)
else
:
self
.
indexed_attrs
=
list
(
ia
)
self
.
indexed_attrs
=
[
attr
.
strip
()
for
attr
in
self
.
indexed_attrs
if
attr
]
self
.
_length
=
BTrees
.
Length
.
Length
()
self
.
clear
()
...
...
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