Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
e1b3be04
Commit
e1b3be04
authored
Feb 23, 2012
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify code of PartitionTable.addNode
parent
85600dbd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
neo/master/pt.py
neo/master/pt.py
+7
-12
No files found.
neo/master/pt.py
View file @
e1b3be04
...
...
@@ -163,10 +163,8 @@ class PartitionTable(PartitionTable):
max_count
=
0
max_cell
=
None
num_cells
=
0
skip
=
False
for
cell
in
row
:
if
cell
.
getNode
()
==
node
:
skip
=
True
if
cell
.
getNode
()
is
node
:
break
if
cell
.
isFeeding
():
feeding_cell
=
cell
...
...
@@ -177,16 +175,13 @@ class PartitionTable(PartitionTable):
max_count
=
count
max_cell
=
cell
if
skip
:
continue
if
num_cells
<=
self
.
nr
:
row
.
append
(
neo
.
lib
.
pt
.
Cell
(
node
,
CellStates
.
OUT_OF_DATE
))
cell_list
.
append
((
offset
,
node
.
getUUID
(),
CellStates
.
OUT_OF_DATE
))
node_count
+=
1
else
:
if
max_count
-
node_count
>
1
:
if
num_cells
<=
self
.
nr
:
row
.
append
(
neo
.
lib
.
pt
.
Cell
(
node
,
CellStates
.
OUT_OF_DATE
))
cell_list
.
append
((
offset
,
node
.
getUUID
(),
CellStates
.
OUT_OF_DATE
))
node_count
+=
1
elif
node_count
+
1
<
max_count
:
if
feeding_cell
is
not
None
or
max_cell
.
isOutOfDate
():
# If there is a feeding cell already or it is
# out-of-date, just drop the node.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment