Skip to content

Commit

Permalink
Update context.py
Browse files Browse the repository at this point in the history
Remove access to Context.rank in a phase of execution where it is `None` instead of an integer.

Fixes #232
  • Loading branch information
eirrgang committed Jul 18, 2019
1 parent 2e60dc8 commit 5992245
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/gmx/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,9 +790,8 @@ def work(self, work):
# element.namespace should be mapped, but not all operations are necessarily implemented.
assert element.namespace in self.__operations
if not element.operation in self.__operations[element.namespace]:
if self.rank < 1:
logger.error("Operation {} not found in map {}".format(element.operation,
str(self.__operations)))
logger.error("Operation {} not found in map {}".format(element.operation,
str(self.__operations)))
# This check should be performed when deciding if the context is appropriate for the work.
# If we are just going to use a try/catch block for this test, then we should differentiate
# this exception from those raised due to incorrect usage.
Expand Down

0 comments on commit 5992245

Please sign in to comment.