aboutsummaryrefslogtreecommitdiff
path: root/grab-queue
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-07-08 14:08:27 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-07-08 14:08:27 -0300
commitd27f73c22edcfa1481b0804f8297ef535b6e2611 (patch)
treeefca256dbed3de7ca823643791a8f3357c76ff61 /grab-queue
parente6b8c9637186029a46f0a8e3f5d0835cc32ed6a5 (diff)
downloadgrab-queue-d27f73c22edcfa1481b0804f8297ef535b6e2611.tar.gz
grab-queue-d27f73c22edcfa1481b0804f8297ef535b6e2611.tar.bz2
Ensure download folder exists before writing to the log
Diffstat (limited to 'grab-queue')
-rwxr-xr-xgrab-queue4
1 files changed, 2 insertions, 2 deletions
diff --git a/grab-queue b/grab-queue
index cbaf141..d9959a9 100755
--- a/grab-queue
+++ b/grab-queue
@@ -75,11 +75,11 @@ class DownloadMultiple:
folder = os.path.dirname(local_filename)
log_sep = ''
+ self.ensuredir(folder)
+
with open(log_sep + 'grab-queue.log', "a") as log:
log.write('Downloading ' + url + '...')
- self.ensuredir(local_filename)
-
# Set opts
# Other opts: -q --show-progress -O
downloader_bin = self.downloader.split(' ')[0]