Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fao-fetcher
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dbnomics-fetchers
fao-fetcher
Commits
d279fb2c
Commit
d279fb2c
authored
3 years ago
by
Pierre Dittgen
Browse files
Options
Downloads
Patches
Plain Diff
Fix linter issues
parent
919166a8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
convert.py
+1
-2
1 addition, 2 deletions
convert.py
download.py
+8
-5
8 additions, 5 deletions
download.py
with
9 additions
and
7 deletions
convert.py
+
1
−
2
View file @
d279fb2c
...
...
@@ -30,7 +30,6 @@ See also `.gitlab-ci.yml` in which data is committed to a Git repository of conv
import
argparse
import
csv
import
json
import
logging
import
shutil
import
sys
...
...
@@ -437,7 +436,7 @@ def main():
except
KeyboardInterrupt
:
return
except
:
except
Exception
:
log
.
exception
(
"
Error while generating dataset
"
)
ds_info
=
None
if
ds_info
is
None
:
...
...
This diff is collapsed.
Click to expand it.
download.py
+
8
−
5
View file @
d279fb2c
...
...
@@ -23,14 +23,17 @@
"""
Download data from JHU.
"""
import
argparse
import
http.client
import
json
import
logging
import
sys
,
os
import
request
s
import
os
import
sy
s
import
zipfile
import
json
from
io
import
BytesIO
from
zipfile
import
ZipFile
from
pathlib
import
Path
from
zipfile
import
ZipFile
import
requests
# Download main FAO file
...
...
@@ -99,7 +102,7 @@ def main():
logging
.
DEBUG
if
args
.
debug_http
else
logging
.
WARNING
)
if
args
.
debug_http
:
http
.
client
.
HTTPConnection
.
debuglevel
=
1
http
.
client
.
HTTPConnection
.
set_
debug
_
level
(
1
)
target_dir
=
args
.
target_dir
if
not
target_dir
.
exists
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment