Skip to content

Commit b6a4297

Browse files
committed
Corrected returned booleans at the end of different workflow branches
1 parent bbd3e29 commit b6a4297

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/murfey/client/contexts/clem.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ def post_transfer(
313313
post_result = self.process_tiff_series(tiff_dataset, environment)
314314
if post_result is False:
315315
return False
316-
return True
316+
317317
else:
318318
logger.debug(f"TIFF series {series_name!r} is still being processed")
319319

@@ -322,14 +322,14 @@ def post_transfer(
322322
# Type checking to satisfy MyPy
323323
if not environment:
324324
logger.warning("No environment passed in")
325-
return True
325+
return False
326326

327327
# Location of the file on the client PC
328328
source = _get_source(transferred_file, environment)
329329
# Type checking to satisfy MyPy
330330
if not source:
331331
logger.warning(f"No source found for file {transferred_file}")
332-
return True
332+
return False
333333

334334
logger.debug(
335335
f"File {transferred_file.name!r} is a valid LIF file; starting processing"
@@ -351,15 +351,15 @@ def post_transfer(
351351
post_result = self.register_lif_file(destination_file, environment)
352352
if post_result is False:
353353
return False
354-
logger.debug(f"Registered {destination_file.name!r} in the database")
354+
logger.info(f"Registered {destination_file.name!r} in the database")
355355

356356
# Post URL to trigger job and convert LIF file into image stacks
357357
post_result = self.process_lif_file(destination_file, environment)
358358
if post_result is False:
359359
return False
360-
logger.debug(f"Started preprocessing of {destination_file.name!r}")
360+
logger.info(f"Started preprocessing of {destination_file.name!r}")
361361

362-
return True
362+
# Function has completed as expected
363363
return True
364364

365365
def register_lif_file(

0 commit comments

Comments
 (0)