Move log statement to top of method.
This commit is contained in:
parent
2f33023025
commit
3aa064cde3
1 changed files with 3 additions and 2 deletions
|
@ -933,6 +933,9 @@ class Photo(ObjectBase):
|
|||
'''
|
||||
Load the file's height, width, etc as appropriate for this type of file.
|
||||
'''
|
||||
self.photodb.log.debug('Reloading metadata for %s', self)
|
||||
|
||||
# If the file has disappeared, this will just return None.
|
||||
self.bytes = self.real_path.size
|
||||
self.width = None
|
||||
self.height = None
|
||||
|
@ -940,8 +943,6 @@ class Photo(ObjectBase):
|
|||
self.ratio = None
|
||||
self.duration = None
|
||||
|
||||
self.photodb.log.debug('Reloading metadata for %s', self)
|
||||
|
||||
if self.simple_mimetype == 'image':
|
||||
try:
|
||||
image = PIL.Image.open(self.real_path.absolute_path)
|
||||
|
|
Loading…
Reference in a new issue