Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
flask-covid19
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Wöhlke
flask-covid19
Commits
b35cb6a8
Commit
b35cb6a8
authored
4 years ago
by
thomaswoehlke
Browse files
Options
Downloads
Patches
Plain Diff
### 0.0.18 Release
parent
7f74295d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/covid19/blueprints/rki_landkreise/rki_service_download.py
+3
-3
3 additions, 3 deletions
...covid19/blueprints/rki_landkreise/rki_service_download.py
src/covid19/blueprints/rki_landkreise/rki_service_import.py
+1
-6
1 addition, 6 deletions
src/covid19/blueprints/rki_landkreise/rki_service_import.py
with
4 additions
and
9 deletions
src/covid19/blueprints/rki_landkreise/rki_service_download.py
+
3
−
3
View file @
b35cb6a8
...
...
@@ -29,17 +29,17 @@ class RkiLandkreiseServiceDownload:
app
.
logger
.
info
(
"
"
+
data_file
+
"
"
)
except
RuntimeError
as
runtimeError
:
app
.
logger
.
error
(
"
############################################################
"
)
app
.
logger
.
error
(
"
"
+
runtimeError
+
"
"
)
app
.
logger
.
error
(
"
runtimeError
"
+
runtimeError
+
"
"
)
app
.
logger
.
error
(
"
############################################################
"
)
flash
(
message
=
"
error while downloading:
"
+
self
.
cfg
.
cvsfile_path
,
category
=
'
error
'
)
except
AttributeError
as
attributeError
:
app
.
logger
.
error
(
"
############################################################
"
)
app
.
logger
.
error
(
attributeError
)
app
.
logger
.
error
(
"
attributeError
"
+
attributeError
+
"
"
)
app
.
logger
.
error
(
"
############################################################
"
)
flash
(
message
=
"
error after downloading:
"
+
self
.
cfg
.
cvsfile_path
,
category
=
'
error
'
)
except
Exception
as
exception
:
app
.
logger
.
error
(
"
############################################################
"
)
app
.
logger
.
error
(
exception
)
app
.
logger
.
error
(
"
exception
"
+
exception
+
"
"
)
app
.
logger
.
error
(
"
############################################################
"
)
flash
(
message
=
"
error while downloading:
"
+
self
.
cfg
.
cvsfile_path
,
category
=
'
error
'
)
finally
:
...
...
This diff is collapsed.
Click to expand it.
src/covid19/blueprints/rki_landkreise/rki_service_import.py
+
1
−
6
View file @
b35cb6a8
...
...
@@ -24,17 +24,12 @@ class RkiLandkreiseServiceImport:
app
.
logger
.
info
(
"
import into TABLE:
"
+
self
.
cfg
.
tablename
+
"
from
"
+
self
.
cfg
.
cvsfile_path
)
app
.
logger
.
info
(
"
------------------------------------------------------------
"
)
row
=
None
if
sys
.
platform
==
'
linux
'
:
keyDate_reported
=
'
\ufeff
Date_reported
'
else
:
keyDate_reported
=
'
Date_reported
'
try
:
RkiLandkreiseImport
.
remove_all
()
with
open
(
self
.
cfg
.
cvsfile_
name
,
newline
=
'
\n
'
)
as
csv_file
:
with
open
(
self
.
cfg
.
cvsfile_
path
,
newline
=
'
\n
'
)
as
csv_file
:
file_reader
=
csv
.
DictReader
(
csv_file
,
delimiter
=
'
,
'
,
quotechar
=
'"'
)
k
=
0
for
row
in
file_reader
:
# TODO: #140 move WhoImport to RKI in: rk_service_import.py
o
=
RkiLandkreiseImport
(
OBJECTID
=
row
[
'
OBJECTID
'
],
ADE
=
row
[
'
ADE
'
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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