Commit 4122eb3a authored by Jérome Perrin's avatar Jérome Perrin

fix undefined names, formating % and unappropriate warning message.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8117 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 27acda3a
...@@ -43,6 +43,7 @@ from xml.sax.saxutils import escape, quoteattr ...@@ -43,6 +43,7 @@ from xml.sax.saxutils import escape, quoteattr
import os import os
import md5 import md5
import threading import threading
import types
try: try:
from Products.PageTemplates.Expressions import SecureModuleImporter from Products.PageTemplates.Expressions import SecureModuleImporter
...@@ -918,12 +919,12 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -918,12 +919,12 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
'manage_tabs_message=Catalog%%20Cleared' % URL1) 'manage_tabs_message=Catalog%%20Cleared' % URL1)
def manage_catalogClearReserved(self, REQUEST=None, RESPONSE=None, URL1=None): def manage_catalogClearReserved(self, REQUEST=None, RESPONSE=None, URL1=None):
""" clears the whole enchilada """ """ clears reserved uids """
self.clearReserved() self.clearReserved()
if RESPONSE and URL1: if RESPONSE and URL1:
RESPONSE.redirect('%s/manage_catalogAdvanced?' \ RESPONSE.redirect('%s/manage_catalogAdvanced?' \
'manage_tabs_message=Catalog%20Cleared' % URL1) 'manage_tabs_message=Catalog%%20Cleared' % URL1)
def manage_catalogFoundItems(self, REQUEST, RESPONSE, URL2, URL1, def manage_catalogFoundItems(self, REQUEST, RESPONSE, URL2, URL1,
obj_metatypes=None, obj_metatypes=None,
...@@ -1189,7 +1190,6 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -1189,7 +1190,6 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
for method_name in methods: for method_name in methods:
method = getattr(self, method_name) method = getattr(self, method_name)
try: try:
#if 1:
method(uid = uid) method(uid = uid)
except ConflictError: except ConflictError:
raise raise
...@@ -1296,8 +1296,6 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -1296,8 +1296,6 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
def getMetadataForPath(self, path): def getMetadataForPath(self, path):
""" Accesses a single record for a given path """ """ Accesses a single record for a given path """
try: try:
if uid is None:
return None
# Get the appropriate SQL Method # Get the appropriate SQL Method
method = getattr(self, self.sql_getitem_by_path) method = getattr(self, self.sql_getitem_by_path)
brain = method(path = path)[0] brain = method(path = path)[0]
...@@ -1310,7 +1308,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -1310,7 +1308,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
except: except:
# This is a real LOG message # This is a real LOG message
# which is required in order to be able to import .zexp files # which is required in order to be able to import .zexp files
LOG('SQLCatalog', WARNING, "could not find uid from path %s" % (path,)) LOG('SQLCatalog', WARNING,
"could not find metadata from path %s" % (path,))
return None return None
def getIndexDataForPath(self, path): def getIndexDataForPath(self, path):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment