Commit c722ae80 authored by Romain Courteaud's avatar Romain Courteaud

Modify code layout.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@7237 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b7fb3634
...@@ -599,7 +599,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -599,7 +599,8 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
except ConflictError: except ConflictError:
raise raise
except: except:
LOG('SQLCatalog', WARNING, 'could not clear catalog with %s' % method_name, error=sys.exc_info()) LOG('SQLCatalog', WARNING,
'could not clear catalog with %s' % method_name, error=sys.exc_info())
pass pass
# Reserved uids have been removed. # Reserved uids have been removed.
...@@ -624,7 +625,15 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -624,7 +625,15 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
""" """
method_id = self.sql_catalog_clear_reserved method_id = self.sql_catalog_clear_reserved
method = getattr(self, method_id) method = getattr(self, method_id)
try:
method() method()
except ConflictError:
raise
except:
LOG('SQLCatalog', WARNING,
'could not clear reserved catalog with %s' % \
method_id, error=sys.exc_info())
raise
self._last_clear_reserved_time += 1 self._last_clear_reserved_time += 1
def __getitem__(self, uid): def __getitem__(self, uid):
...@@ -899,19 +908,22 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -899,19 +908,22 @@ class Catalog(Folder, Persistent, Acquisition.Implicit, ExtensionClass.Base):
'Total time: %s<br>' 'Total time: %s<br>'
'Total CPU time: %s' % (`elapse`, `c_elapse`))) 'Total CPU time: %s' % (`elapse`, `c_elapse`)))
def manage_catalogClear(self, REQUEST=None, RESPONSE=None, URL1=None, sql_catalog_id=None): def manage_catalogClear(self, REQUEST=None, RESPONSE=None,
URL1=None, sql_catalog_id=None):
""" clears the whole enchilada """ """ clears the whole enchilada """
self.clear() self.clear()
if RESPONSE and URL1: if RESPONSE and URL1:
RESPONSE.redirect(URL1 + '/manage_catalogAdvanced?manage_tabs_message=Catalog%20Cleared') RESPONSE.redirect('%s/manage_catalogAdvanced?' \
'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 the whole enchilada """
self.clearReserved() self.clearReserved()
if RESPONSE and URL1: if RESPONSE and URL1:
RESPONSE.redirect(URL1 + '/manage_catalogAdvanced?manage_tabs_message=Catalog%20Cleared') RESPONSE.redirect('%s/manage_catalogAdvanced?' \
'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,
......
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