Private
Public Access
1
0

removed unnecessary else

This commit is contained in:
Sander Roosendaal
2019-12-22 15:14:39 +01:00
parent 77f7cf4844
commit 2bd9d96273

View File

@@ -1581,7 +1581,7 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
grpc.channel_ready_future(channel).result(timeout=10) grpc.channel_ready_future(channel).result(timeout=10)
except grpc.FutureTimeoutError: except grpc.FutureTimeoutError:
return 0 return 0
else:
stub = calculator_pb2_grpc.PowerStub(channel) stub = calculator_pb2_grpc.PowerStub(channel)
response = stub.CalcPower(calculator_pb2.WorkoutPowerRequest( response = stub.CalcPower(calculator_pb2.WorkoutPowerRequest(
filename = csvfile, filename = csvfile,
@@ -1596,6 +1596,14 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
if result == 0: if result == 0:
# send failure email # send failure email
return 0 return 0
# do something with boat type
try:
rowdata = rdata(csvfile)
except IOError:
try:
rowdata = rdata(csvfile)
except IOError:
rowdata = rdata(csvfile)
else: else:
boatfile = { boatfile = {