Get rid of redundant code.

This commit is contained in:
Itamar Turner-Trauring 2022-03-09 12:42:24 -05:00
parent 5d51aac0d3
commit e598fbbc85

View File

@ -182,10 +182,7 @@ class UploadsInProgress(object):
If the given upload doesn't exist at all, nothing happens.
"""
if storage_index in self._uploads:
try:
in_progress = self._uploads[storage_index]
except KeyError:
return
in_progress = self._uploads[storage_index]
# For pre-existing upload, make sure password matches.
if share_number in in_progress.upload_secrets and not timing_safe_compare(
in_progress.upload_secrets[share_number], upload_secret