Skip to content

Commit

Permalink
some fixes and dead code discovered?
Browse files Browse the repository at this point in the history
  • Loading branch information
ipelupessy committed Mar 11, 2022
1 parent 8b443b6 commit 5557bf8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 7 additions & 1 deletion src/amuse/datamodel/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1702,6 +1702,9 @@ def to_print_list(self):
result.append(type(x))

return result

# this class seems not to be used at all
# in fact it is not clear what it is...
class FixedLinkedArray(LinkedArray):
"""Links between particles and particle sets are stored in LinkedArrays.
"""
Expand Down Expand Up @@ -1735,7 +1738,10 @@ def copy_with_link_transfer(self, from_container, to_container, must_copy = Fals
memento = dict()

if must_copy:
new_container = x.copy(memento, keep_structure = True, filter_attributes = filter_attributes)
raise Exception("unfixed syntax error")
# the following needs to be tested
# was new_container = x.copy(memento, keep_structure = True, filter_attributes = filter_attributes)
new_container = from_container.copy(memento, keep_structure = True, filter_attributes = filter_attributes)
else:
if from_container is None or self.linked_set is from_container:
new_container = to_container
Expand Down
4 changes: 0 additions & 4 deletions src/amuse/rfi/async_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,6 @@ def __init__(self, first, second, operator):
self.parent=first
self.request=FakeASyncRequest()
self.result_handlers = []
try:
self._result_index=first._result_index[index]
except:
self._result_index=None

def result(self):
self.wait()
Expand Down

0 comments on commit 5557bf8

Please sign in to comment.