Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
CaosDB Crawler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
caosdb
Software
CaosDB Crawler
Commits
fa098c97
Commit
fa098c97
authored
1 year ago
by
Henrik tom Wörden
Browse files
Options
Downloads
Patches
Plain Diff
MAINT: replace asserts with raised errors
parent
3b50909a
No related branches found
No related tags found
2 merge requests
!178
FIX: #96 Better error output for crawl.py script.
,
!167
Sync Graph
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/caoscrawler/sync_graph.py
+4
-2
4 additions, 2 deletions
src/caoscrawler/sync_graph.py
src/caoscrawler/sync_node.py
+4
-1
4 additions, 1 deletion
src/caoscrawler/sync_node.py
with
8 additions
and
3 deletions
src/caoscrawler/sync_graph.py
+
4
−
2
View file @
fa098c97
...
...
@@ -301,9 +301,11 @@ class SyncGraph():
equivalent_se
=
self
.
get_equivalent
(
node
)
if
equivalent_se
is
not
None
and
equivalent_se
is
not
node
:
self
.
_merge_into
(
node
,
equivalent_se
)
assert
equivalent_se
.
identifiable
is
not
None
if
equivalent_se
.
identifiable
is
None
:
raise
ValueError
(
"
Identifiable is missing
"
)
else
:
assert
node
.
identifiable
.
get_representation
()
not
in
self
.
_identifiable_look_up
if
node
.
identifiable
.
get_representation
()
in
self
.
_identifiable_look_up
:
raise
RuntimeError
(
"
Identifiable is already in the look up
"
)
self
.
_identifiable_look_up
[
node
.
identifiable
.
get_representation
()]
=
node
@staticmethod
...
...
This diff is collapsed.
Click to expand it.
src/caoscrawler/sync_node.py
+
4
−
1
View file @
fa098c97
...
...
@@ -108,7 +108,10 @@ class SyncNode:
if
self
.
__getattribute__
(
attr
)
is
None
:
self
.
__setattr__
(
attr
,
other
.
__getattribute__
(
attr
))
else
:
assert
self
.
__getattribute__
(
attr
)
==
other
.
__getattribute__
(
attr
)
if
self
.
__getattribute__
(
attr
)
!=
other
.
__getattribute__
(
attr
):
raise
ValueError
(
f
"
Trying to update
{
attr
}
but this would lead to an
"
f
"
override of the value
'
{
self
.
__getattribute__
(
attr
)
}
'
"
f
"
by the value
'
{
other
.
__getattribute__
(
attr
)
}
'"
)
for
p
in
other
.
parents
:
if
not
parent_in_list
(
p
,
self
.
parents
):
self
.
parents
.
append
(
p
)
...
...
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