Skip to content

Commit

Permalink
better handling for python download worker
Browse files Browse the repository at this point in the history
  • Loading branch information
Kunsi committed Feb 7, 2024
1 parent 24a2a89 commit 25bb21d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ url = "<tracker url>"
[download.workers]
# list all available download tools here. Use whatever you want, as long
# as it supports directly downloading to a specific file name.
python = false # this will use urllib.urlopen() to download the file
python = true # the value of this does not matter
wget = ["wget", "-q", "-O", "--TARGETPATH--", "--", "--DOWNLOADURL--"]

# "enable_default" below specifies the behaviour if the `Publishing.<service>.Enable`
Expand Down
2 changes: 1 addition & 1 deletion voctopublish/voctopublish.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ def _download_file(self, source, target):
:return:
"""
logging.info("Downloading file from: " + source)
if not self.ticket.download_command:
if self.ticket.download_command in (None, True, False):
with open(target, "wb") as fh:
with urllib.request.urlopen(
urllib.parse.quote(source, safe=":/")
Expand Down

0 comments on commit 25bb21d

Please sign in to comment.