Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Lozac'h Loic
AgriFrozenAreaProject
Commits
61dbe3ec
Commit
61dbe3ec
authored
Aug 18, 2021
by
Lozac'h Loic
Browse files
debug
parent
d5b94e68
Changes
1
Hide whitespace changes
Inline
Side-by-side
frozenapp/eodags1.py
View file @
61dbe3ec
...
...
@@ -139,9 +139,26 @@ class EodagS1Downloader():
while
still2download
:
for
p
in
sorted
(
products_availability
,
key
=
lambda
k
:
len
(
products_availability
[
k
]),
reverse
=
True
):
print
(
f
"
\n
Starting Download
{
p
}
..."
)
with
closing
(
StringIO
())
as
tqdm_out
:
with
ProgressCallback
(
file
=
tqdm_out
)
as
bar
:
products_availability
[
p
][
0
].
download
(
bar
,
extract
=
False
,
outputs_prefix
=
downdir
)
failed
=
False
try
:
with
closing
(
StringIO
())
as
tqdm_out
:
with
ProgressCallback
(
file
=
tqdm_out
)
as
bar
:
products_availability
[
p
][
0
].
download
(
bar
,
extract
=
False
,
outputs_prefix
=
downdir
)
except
Exception
as
err
:
failed
=
True
print
(
err
)
if
failed
and
len
(
products_availability
[
p
])
==
2
:
failed
=
False
print
(
"Download failed. Trying with PEPS"
)
try
:
with
closing
(
StringIO
())
as
tqdm_out
:
with
ProgressCallback
(
file
=
tqdm_out
)
as
bar
:
products_availability
[
p
][
1
].
download
(
bar
,
extract
=
False
,
outputs_prefix
=
downdir
)
except
Exception
as
err
:
failed
=
True
print
(
err
)
if
products_availability
[
p
][
0
].
location
[:
5
]
==
"file:"
:
products_downloaded
[
p
]
=
products_availability
[
p
][
0
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment