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
65aa2528
Commit
65aa2528
authored
Jul 16, 2004
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
import cleanup
parent
d2d5544a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
25 additions
and
31 deletions
+25
-31
lib/python/Products/ZCatalog/Catalog.py
lib/python/Products/ZCatalog/Catalog.py
+12
-12
lib/python/Products/ZCatalog/CatalogPathAwareness.py
lib/python/Products/ZCatalog/CatalogPathAwareness.py
+0
-1
lib/python/Products/ZCatalog/ProgressHandler.py
lib/python/Products/ZCatalog/ProgressHandler.py
+4
-4
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+2
-2
lib/python/Products/ZCatalog/ZCatalogIndexes.py
lib/python/Products/ZCatalog/ZCatalogIndexes.py
+6
-11
lib/python/Products/ZCatalog/__init__.py
lib/python/Products/ZCatalog/__init__.py
+1
-1
No files found.
lib/python/Products/ZCatalog/Catalog.py
View file @
65aa2528
...
...
@@ -11,27 +11,27 @@
#
##############################################################################
from
Persistence
import
Persistent
import
types
import
logging
from
bisect
import
bisect
from
random
import
randint
import
Acquisition
import
ExtensionClass
from
MultiMapping
import
MultiMapping
import
Record
from
Missing
import
MV
import
logging
from
Persistence
import
Persistent
from
Lazy
import
LazyMap
,
LazyFilter
,
LazyCat
,
LazyValues
from
CatalogBrains
import
AbstractCatalogBrain
,
NoBrainer
import
BTrees.Length
from
BTrees.IIBTree
import
intersection
,
weightedIntersection
,
IISet
from
BTrees.OIBTree
import
OIBTree
from
BTrees.IOBTree
import
IOBTree
import
BTrees.Length
from
Lazy
import
LazyMap
,
LazyCat
,
LazyValues
from
CatalogBrains
import
AbstractCatalogBrain
,
NoBrainer
import
time
,
sys
,
types
from
bisect
import
bisect
from
random
import
randint
LOG
=
logging
.
getLogger
(
'Zope.ZCatalog'
)
try
:
from
DocumentTemplate.cDocumentTemplate
import
safe_callable
except
ImportError
:
...
...
@@ -278,7 +278,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
indexes
=
self
.
indexes
if
isinstance
(
index_type
,
types
.
StringType
):
if
isinstance
(
index_type
,
'str'
):
raise
TypeError
,
"""Catalog addIndex now requires the index type to
be resolved prior to adding; create the proper index in the caller."""
...
...
@@ -755,7 +755,7 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
reverse
=
0
if
sort_index
is
not
None
:
order
=
self
.
_get_sort_attr
(
"order"
,
args
)
if
(
isinstance
(
order
,
types
.
StringType
)
and
if
(
isinstance
(
order
,
'str'
)
and
order
.
lower
()
in
(
'reverse'
,
'descending'
)):
reverse
=
1
# Perform searches with indexes and sort_index
...
...
lib/python/Products/ZCatalog/CatalogPathAwareness.py
View file @
65aa2528
...
...
@@ -13,7 +13,6 @@
"""ZCatalog Findable class"""
import
urllib
from
Globals
import
DTMLFile
from
Acquisition
import
aq_base
...
...
lib/python/Products/ZCatalog/ProgressHandler.py
View file @
65aa2528
...
...
@@ -26,14 +26,14 @@ class IProgressHandler(Interface):
"""
def
init
(
ident
,
max
):
""" Called a
dd
the start of the long running process.
""" Called a
t
the start of the long running process.
'ident' -- a string identifying the operation
'max' -- maximum number of objects to be processed
'max' -- maximum number of objects to be processed
(int)
"""
def
finish
():
""" Called up termin
i
ation """
""" Called up termination """
def
report
(
current
,
*
args
,
**
kw
):
""" Called for every iteration.
...
...
@@ -59,7 +59,7 @@ class StdoutHandler:
self
.
_max
=
max
self
.
_start
=
time
.
time
()
self
.
fp
=
sys
.
stdout
self
.
output
(
'Process started
'
)
self
.
output
(
'Process started
(%d objects to go)'
%
self
.
_max
)
def
finish
(
self
):
self
.
output
(
'Process terminated. Duration: %0.2f seconds'
%
\
...
...
lib/python/Products/ZCatalog/ZCatalog.py
View file @
65aa2528
...
...
@@ -15,6 +15,8 @@
$Id$
"""
import
urllib
,
time
,
sys
,
string
,
logging
from
Globals
import
DTMLFile
,
MessageDialog
import
Globals
...
...
@@ -35,8 +37,6 @@ from ZODB.POSException import ConflictError
from
Products.PluginIndexes.common.PluggableIndex
\
import
PluggableIndexInterface
from
Products.PluginIndexes.TextIndex
import
Splitter
import
urllib
,
time
,
sys
import
string
,
logging
from
IZCatalog
import
IZCatalog
from
ProgressHandler
import
ZLogHandler
...
...
lib/python/Products/ZCatalog/ZCatalogIndexes.py
View file @
65aa2528
...
...
@@ -14,20 +14,15 @@
"""$Id$
"""
from
Globals
import
DTMLFile
,
InitializeClass
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
from
AccessControl.Permissions
import
delete_objects
,
manage_zcatalog_indexes
import
Globals
from
OFS.Folder
import
Folder
from
OFS.FindSupport
import
FindSupport
from
OFS.History
import
Historical
from
OFS.SimpleItem
import
SimpleItem
from
OFS.ObjectManager
import
ObjectManager
,
IFAwareObjectManager
import
os
,
sys
,
time
from
Acquisition
import
Implicit
from
Persistence
import
Persistent
from
Globals
import
DTMLFile
,
InitializeClass
from
AccessControl.SecurityInfo
import
ClassSecurityInfo
from
AccessControl.Permissions
import
manage_zcatalog_indexes
from
OFS.Folder
import
Folder
from
OFS.SimpleItem
import
SimpleItem
from
OFS.ObjectManager
import
IFAwareObjectManager
from
Products.PluginIndexes.common.PluggableIndex
import
PluggableIndexInterface
...
...
lib/python/Products/ZCatalog/__init__.py
View file @
65aa2528
...
...
@@ -13,7 +13,7 @@
"""ZCatalog product"""
import
ZCatalog
,
Catalog
,
CatalogAwareness
,
CatalogPathAwareness
,
ZClasse
s
import
ZCatalog
,
Catalog
Awareness
,
CatalogPathAwarenes
s
from
Products.PluginIndexes.TextIndex
import
Vocabulary
from
ZClasses
import
createZClassForBase
...
...
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