Make an invalid download target fatal
This should never happen, so there's no reason for it to log an error instead of raising an exception.
This commit is contained in:
parent
b2d8905d68
commit
bd5f63db46
@ -981,8 +981,8 @@ class DownloadManager(QAbstractListModel):
|
||||
target.cmdline))
|
||||
download.autoclose = True
|
||||
download.set_fileobj(fobj)
|
||||
else:
|
||||
log.downloads.error("Unknown download target: {}".format(target))
|
||||
else: # pragma: no cover
|
||||
raise ValueError("Unknown download target: {}".format(target))
|
||||
|
||||
def _open_download(self, download, cmdline):
|
||||
"""Open the given download but only if it was successful.
|
||||
|
Loading…
Reference in New Issue
Block a user