Skip to content

Commit bf8b65b

Browse files
committed
flip an if
1 parent f8f96a4 commit bf8b65b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/qbpm/main.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,11 @@ def session_info(
260260
session_paths.append(Path(session))
261261
session_path = next(filter(lambda path: path.is_file(), session_paths), None)
262262

263-
if not session_path:
264-
tried = or_phrase([str(p.resolve()) for p in session_paths])
265-
error(f"could not find session file at {tried}")
266-
sys.exit(1)
267-
268-
return (Profile(profile_name or session_path.stem, **vars(context)), session_path)
263+
if session_path:
264+
return (Profile(profile_name or session_path.stem, **vars(context)), session_path)
265+
tried = or_phrase([str(p.resolve()) for p in session_paths])
266+
error(f"could not find session file at {tried}")
267+
sys.exit(1)
269268

270269

271270
def exit_with(result: bool) -> NoReturn:

0 commit comments

Comments
 (0)