From 59922455d19e799992e1f3d4504c86d342da3dac Mon Sep 17 00:00:00 2001 From: "M. Eric Irrgang" Date: Thu, 18 Jul 2019 19:23:24 +0300 Subject: [PATCH] Update context.py Remove access to Context.rank in a phase of execution where it is `None` instead of an integer. Fixes #232 --- src/gmx/context.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gmx/context.py b/src/gmx/context.py index 700e3991cf..5d5b99e17c 100644 --- a/src/gmx/context.py +++ b/src/gmx/context.py @@ -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.