Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ippidb-web
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
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
iPPIDB
ippidb-web
Commits
e42b1833
Commit
e42b1833
authored
7 years ago
by
Hervé MENAGER
Browse files
Options
Downloads
Patches
Plain Diff
add traceback print for bibliography import
Former-commit-id: 584a4ca53024ba184f076276dbf4d5497106cb7c
parent
88ce1e7d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ippisite/ippidb/management/commands/import_v1_data.py
+9
-3
9 additions, 3 deletions
ippisite/ippidb/management/commands/import_v1_data.py
with
9 additions
and
3 deletions
ippisite/ippidb/management/commands/import_v1_data.py
+
9
−
3
View file @
e42b1833
...
...
@@ -118,11 +118,17 @@ class Command(BaseCommand):
b
.
id_source
=
row
[
2
]
b
.
save
(
autofill
=
True
)
except
Exception
as
e
:
self
.
stdout
.
write
(
self
.
style
.
ERROR
(
'
Failed inserting {}
'
.
format
(
row
[
2
])))
if
options
[
'
stoponfail
'
]:
import
traceback
self
.
stderr
.
write
(
traceback
.
format_exc
())
raise
CommandError
(
'
Failed inserting {} {}
'
.
format
(
row
[
1
],
row
[
2
]))
else
:
self
.
stdout
.
write
(
self
.
style
.
ERROR
(
'
Failed inserting {} {}
'
.
format
(
row
[
1
],
row
[
2
])))
else
:
self
.
stdout
.
write
(
self
.
style
.
SUCCESS
(
'
Successfully inserted {}
'
.
format
(
row
[
2
])))
self
.
style
.
SUCCESS
(
'
Successfully inserted
{}
{}
'
.
format
(
row
[
1
],
row
[
2
])))
if
options
[
'
proteins
'
]:
cursor
.
execute
(
"""
SELECT * FROM protein
"""
)
rows
=
cursor
.
fetchall
()
...
...
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