Skip to content

Commit 217d6d6

Browse files
authored
Update sequencer.py
Fix Codacy
1 parent c81fe17 commit 217d6d6

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/osa/scripts/sequencer.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,27 +210,18 @@ def update_sequence_status(seq_list):
210210

211211

212212
def check_catB_status(seq):
213-
if seq.type == "PEDCALIB":
214-
seq.catbstatus = 'None'
215-
elif seq.type == "DATA":
216-
213+
catbstatus = 'None'
214+
if seq.type == "DATA":
217215
directory = options.directory
218-
219216
# Buscar archivos "closed"
220217
closed_files = list(directory.glob(f"catB*{seq.run}*.closed"))
221218
if any(f.exists() for f in closed_files):
222219
catbstatus = 'CLOSED'
223-
else:
224-
# Buscar archivos "log"
225-
220+
else:
226221
log_files = list(options.log_directory.glob(f"catB_calibration_{seq.run}_*.err"))
227222

228-
# Si no hay archivos o ninguno existe
229-
if not log_files or not any(f.exists() for f in log_files):
230-
catbstatus = 'None'
231-
else:
223+
if log_files and any(f.exists() for f in log_files):
232224
status_set = False
233-
234225
for f in log_files:
235226
if f.exists():
236227
with f.open("r") as fh:

0 commit comments

Comments
 (0)