Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hivemind
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
hive
hivemind
Commits
4a7b72d5
Commit
4a7b72d5
authored
4 years ago
by
Bartek Wrona
Browse files
Options
Downloads
Patches
Plain Diff
Mocks should not impact production flow if no data is loaded.
parent
44d8b770
No related branches found
No related tags found
2 merge requests
!456
Release candidate v1 24
,
!428
Mocks should not impact production flow if no data is loaded.
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hive/indexer/mock_block_provider.py
+4
-2
4 additions, 2 deletions
hive/indexer/mock_block_provider.py
with
4 additions
and
2 deletions
hive/indexer/mock_block_provider.py
+
4
−
2
View file @
4a7b72d5
...
...
@@ -50,6 +50,9 @@ class MockBlockProvider(MockDataProvider):
@classmethod
def
get_block_data
(
cls
,
block_num
,
make_on_empty
=
False
):
if
len
(
cls
.
block_data
)
==
0
:
return
None
data
=
cls
.
block_data
.
get
(
block_num
,
None
)
#if data is not None:
...
...
@@ -57,8 +60,7 @@ class MockBlockProvider(MockDataProvider):
if
make_on_empty
and
data
is
None
:
data
=
cls
.
make_empty_block
(
block_num
)
if
data
is
None
:
raise
MockDataProviderException
(
"
No more blocks to serve
"
)
return
data
@classmethod
...
...
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