File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -124,14 +124,14 @@ def main(args, environ=None):
124
124
# Errors from definition files are already pre-formatted so we just write them
125
125
# directly to stderr and exit
126
126
print (str (exc ), file = sys .stderr )
127
- sys .exit (1 )
127
+ sys .exit (10 )
128
128
except FileValidationError as exc :
129
129
# Handle errors encountered while reading user-supplied data
130
130
print (f"{ exc .__class__ .__name__ } : { exc } " , file = sys .stderr )
131
- sys .exit (1 )
131
+ sys .exit (11 )
132
132
except EHRQLPermissionError as exc :
133
133
print (f"{ exc .__class__ .__name__ } : { exc } " , file = sys .stderr )
134
- sys .exit (1 )
134
+ sys .exit (12 )
135
135
except Exception as exc :
136
136
# For functions which take a `backend_class` give that class the chance to set
137
137
# the appropriate exit status for any errors
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ def dataset_definition():
78
78
with pytest .raises (SystemExit ) as exc_info :
79
79
call_cli ("dump-dataset-sql" , dataset_definition_path )
80
80
81
- assert exc_info .value .code == 1
81
+ assert exc_info .value .code > 0
82
82
captured = call_cli .readouterr ()
83
83
assert "patients.date_of_birth.year + (patients.sex.is_null())" in captured .err
84
84
assert "main.py" not in captured .err
You can’t perform that action at this time.
0 commit comments