Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core

Commits:
a4342963 by Mark Sapiro at 2019-01-04T18:47:17Z
Replace ctx.exit() with sys.exit() to work around click bug.

This is a workaround for https://github.com/pallets/click/issues/1134
and https://gitlab.com/mailman/mailman/issues/520.  It is incomplete
as it doesn't fix the issue of subcommand --help hanging, but at least
it allows tests to pass.

- - - - -
29ce2809 by Abhilash Raj at 2019-01-04T21:09:28Z
Merge branch 'click_bug' into 'master'

Replace ctx.exit() with sys.exit() to work around click bug.

See merge request mailman/mailman!428
- - - - -


2 changed files:

- src/mailman/commands/cli_help.py
- src/mailman/commands/cli_lists.py


Changes:

=====================================
src/mailman/commands/cli_help.py
=====================================
@@ -17,6 +17,7 @@
 
 """The 'help' subcommand."""
 
+import sys
 import click
 
 from mailman.core.i18n import _
@@ -33,7 +34,7 @@ from zope.interface import implementer
 # https://github.com/pallets/click/issues/832
 def help(ctx):                                      # pragma: nocover
     click.echo(ctx.parent.get_help(), color=ctx.color)
-    ctx.exit()
+    sys.exit()
 
 
 @public


=====================================
src/mailman/commands/cli_lists.py
=====================================
@@ -85,7 +85,7 @@ def lists(ctx, advertised, names, descriptions, quiet, 
domains):
     if len(mailing_lists) == 0:
         if not quiet:
             print(_('No matching mailing lists found'))
-        ctx.exit()
+        sys.exit()
     count = len(mailing_lists)                  # noqa: F841
     if not quiet:
         print(_('$count matching mailing lists found:'))



View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/e62dc4a754307c63daa4cac38df9b6dca3b0ec9a...29ce2809257adc434f6206c01db4de2f152d2659

-- 
View it on GitLab: 
https://gitlab.com/mailman/mailman/compare/e62dc4a754307c63daa4cac38df9b6dca3b0ec9a...29ce2809257adc434f6206c01db4de2f152d2659
You're receiving this email because of your account on gitlab.com.
_______________________________________________
Mailman-checkins mailing list
Mailman-checkins@python.org
Unsubscribe: 
https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to