mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-25 17:14:48 +00:00
Simplify error handling in Document.get_file_size()
SystemExit and KeyboardInterrupt are not inherited from Exception, so they don't need special treatment here.
This commit is contained in:
parent
3bb6984132
commit
51ea37a403
1 changed files with 0 additions and 2 deletions
|
|
@ -52,8 +52,6 @@ class AbstractDocument(CollectionMember, index.Indexed, models.Model):
|
|||
if self.file_size is None:
|
||||
try:
|
||||
self.file_size = self.file.size
|
||||
except (SystemExit, KeyboardInterrupt):
|
||||
raise
|
||||
except Exception:
|
||||
# File doesn't exist
|
||||
return
|
||||
|
|
|
|||
Loading…
Reference in a new issue