Skip to content

Commit 476ed5d

Browse files
committed
DOP-1218: Avoid referencing undeclared variable
1 parent 7f5c32e commit 476ed5d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

snooty/main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,8 @@ def main() -> None:
291291
print("Closing connection...")
292292
connection.close()
293293

294-
if project.config.fail_on_diagnostics:
295-
EXIT_STATUS_ERROR_DIAGNOSTICS = 1
296-
297294
if args["build"] and backend.total_errors > 0:
298-
sys.exit(EXIT_STATUS_ERROR_DIAGNOSTICS)
295+
exit_code = (
296+
1 if project.config.fail_on_diagnostics else EXIT_STATUS_ERROR_DIAGNOSTICS
297+
)
298+
sys.exit(exit_code)

0 commit comments

Comments
 (0)