mirror of
https://github.com/django/django.git
synced 2025-10-18 22:38:08 +00:00
Fixed #28996 -- Simplified some boolean constructs and removed trivial continue statements.
This commit is contained in:
parent
4bcec02368
commit
a38ae914d8
34 changed files with 95 additions and 159 deletions
|
@ -86,8 +86,8 @@ class HashedFilesMixin:
|
|||
parsed_name = urlsplit(unquote(name))
|
||||
clean_name = parsed_name.path.strip()
|
||||
filename = (filename and urlsplit(unquote(filename)).path.strip()) or clean_name
|
||||
opened = False
|
||||
if content is None:
|
||||
opened = content is None
|
||||
if opened:
|
||||
if not self.exists(filename):
|
||||
raise ValueError("The file '%s' could not be found with %r." % (filename, self))
|
||||
try:
|
||||
|
@ -95,7 +95,6 @@ class HashedFilesMixin:
|
|||
except IOError:
|
||||
# Handle directory paths and fragments
|
||||
return name
|
||||
opened = True
|
||||
try:
|
||||
file_hash = self.file_hash(clean_name, content)
|
||||
finally:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue