Skip to content

Commit

Permalink
Catch more specific exceptions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jun 22, 2018
1 parent 3994f83 commit 5779518
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OFS/ObjectManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from Acquisition import aq_base, aq_acquire, aq_parent
from Acquisition import Implicit
from DateTime import DateTime
from DateTime.interfaces import DateTimeError
from Persistence import Persistent
from six import string_types
from six import text_type
Expand Down Expand Up @@ -861,9 +862,8 @@ def compute_size(self, ob):
def last_modified(self, ob):
try:
return DateTime(ob._p_mtime).strftime("%Y-%m-%d %H:%M")
except:
pass
return ''
except (DateTimeError, AttributeError):
return ''


# Don't InitializeClass, there is a specific __class_init__ on ObjectManager
Expand Down

0 comments on commit 5779518

Please sign in to comment.