diff --git a/etiquette/objects.py b/etiquette/objects.py index 75f6f81..8110cfb 100644 --- a/etiquette/objects.py +++ b/etiquette/objects.py @@ -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)