mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix wrong use of "is" and "is not" in Python if-statements
This commit is contained in:
@@ -111,7 +111,7 @@ def __generate_property_input_chunks(self, array, parameters):
|
|||||||
index = -1
|
index = -1
|
||||||
while index < len(array):
|
while index < len(array):
|
||||||
chunk = Properties_pb2.PropertyInputChunk()
|
chunk = Properties_pb2.PropertyInputChunk()
|
||||||
if index is -1:
|
if index == -1:
|
||||||
chunk.params.CopyFrom(parameters)
|
chunk.params.CopyFrom(parameters)
|
||||||
index += 1
|
index += 1
|
||||||
else:
|
else:
|
||||||
@@ -1244,7 +1244,7 @@ def __generate_nnc_property_input_chunks(self, array, parameters):
|
|||||||
index = -1
|
index = -1
|
||||||
while index < len(array):
|
while index < len(array):
|
||||||
chunk = NNCProperties_pb2.NNCValuesChunk()
|
chunk = NNCProperties_pb2.NNCValuesChunk()
|
||||||
if index is -1:
|
if index == -1:
|
||||||
chunk.params.CopyFrom(parameters)
|
chunk.params.CopyFrom(parameters)
|
||||||
index += 1
|
index += 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ class Instance:
|
|||||||
port_env = os.environ.get('RESINSIGHT_GRPC_PORT')
|
port_env = os.environ.get('RESINSIGHT_GRPC_PORT')
|
||||||
if port_env:
|
if port_env:
|
||||||
port = int(port_env)
|
port = int(port_env)
|
||||||
if launch_port is not -1:
|
if launch_port != -1:
|
||||||
port = launch_port
|
port = launch_port
|
||||||
|
|
||||||
if not resinsight_executable:
|
if not resinsight_executable:
|
||||||
|
|||||||
Reference in New Issue
Block a user