correct error handling for retrieving file modification date
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3469 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
3d4092fe44
commit
9c7ad26306
1 changed files with 6 additions and 1 deletions
|
@ -97,7 +97,12 @@ class MediaAsset(MediaAssetFile, ExternalFileAdapter):
|
|||
if not d:
|
||||
dp = self.getDataPath()
|
||||
if dp is not None:
|
||||
return datetime.fromtimestamp(os.path.getmtime(dp))
|
||||
try:
|
||||
return datetime.fromtimestamp(os.path.getmtime(dp))
|
||||
except OSError, e:
|
||||
getLogger('loops.media.asset.MediaAsset').warn(e)
|
||||
return None
|
||||
|
||||
return d
|
||||
def setModified(self, value):
|
||||
self.context._modified = value
|
||||
|
|
Loading…
Add table
Reference in a new issue