Skip to content

Commit 90c00df

Browse files
committed
Use EXIT_USAGEERROR instead of magic number
1 parent 495b441 commit 90c00df

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/_pytest/config/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def main(args=None, plugins=None):
5151
:arg plugins: list of plugin objects to be auto-registered during
5252
initialization.
5353
"""
54+
from _pytest.main import EXIT_USAGEERROR
55+
5456
try:
5557
try:
5658
config = _prepareconfig(args, plugins)
@@ -69,7 +71,7 @@ def main(args=None, plugins=None):
6971
tw = py.io.TerminalWriter(sys.stderr)
7072
for msg in e.args:
7173
tw.line("ERROR: {}\n".format(msg), red=True)
72-
return 4
74+
return EXIT_USAGEERROR
7375

7476

7577
class cmdline(object): # compatibility namespace

0 commit comments

Comments
 (0)