mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:54:56 +02:00
Merge remote-tracking branch 'origin/master' into kuba_chain
This commit is contained in:
@@ -38,7 +38,7 @@ load-plugins=linter_plugin
|
||||
# --enable=similarities". If you want to run only the classes checker, but have
|
||||
# no Warning level messages displayed, use"--disable=all --enable=classes
|
||||
# --disable=W"
|
||||
disable=fixme,locally-disabled,abstract-class-not-used,duplicate-code
|
||||
disable=fixme,locally-disabled,abstract-class-not-used,bad-continuation,too-few-public-methods,no-self-use,duplicate-code
|
||||
# abstract-class-not-used cannot be disabled locally (at least in pylint 1.4.1)
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ function-rgx=[a-z_][a-z0-9_]{2,40}$
|
||||
function-name-hint=[a-z_][a-z0-9_]{2,40}$
|
||||
|
||||
# Regular expression matching correct variable names
|
||||
variable-rgx=[a-z_][a-z0-9_]{2,30}$
|
||||
variable-rgx=[a-z_][a-z0-9_]{1,30}$
|
||||
|
||||
# Naming hint for variable names
|
||||
variable-name-hint=[a-z_][a-z0-9_]{2,30}$
|
||||
@@ -228,7 +228,8 @@ max-module-lines=1250
|
||||
indent-string=' '
|
||||
|
||||
# Number of spaces of indent required inside a hanging or continued line.
|
||||
indent-after-paren=4
|
||||
# This does something silly/broken...
|
||||
#indent-after-paren=4
|
||||
|
||||
|
||||
[TYPECHECK]
|
||||
|
||||
@@ -17,10 +17,7 @@ env:
|
||||
- GOPATH=/tmp/go
|
||||
- PATH=$GOPATH/bin:$PATH
|
||||
matrix:
|
||||
- TOXENV=py26 BOULDER_INTEGRATION=1
|
||||
- TOXENV=py27 BOULDER_INTEGRATION=1
|
||||
- TOXENV=py33
|
||||
- TOXENV=py34
|
||||
- TOXENV=lint
|
||||
- TOXENV=cover
|
||||
|
||||
|
||||
@@ -68,14 +68,17 @@ The following tools are there to help you:
|
||||
Integration
|
||||
~~~~~~~~~~~
|
||||
|
||||
First, install `Go`_ 1.5 and start Boulder_, an ACME CA server::
|
||||
First, install `Go`_ 1.5 (pick a value for GOPATH and put $GOPATH/bin in your
|
||||
PATH), libtool-ltdl, mariadb-server and rabbitmq-server and then start
|
||||
Boulder_, an ACME CA server::
|
||||
|
||||
./tests/boulder-start.sh
|
||||
|
||||
The script will download, compile and run the executable; please be
|
||||
patient - it will take some time... Once its ready, you will see
|
||||
``Server running, listening on 127.0.0.1:4000...``. You may now run
|
||||
(in a separate terminal)::
|
||||
The script will download, compile and run the executable; please be patient -
|
||||
it will take some time... Once its ready, you will see ``Server running,
|
||||
listening on 127.0.0.1:4000...``. Add the ``venv/bin/`` subdirectory of your
|
||||
letsencrypt repo to your path, and add an ``/etc/hosts`` entry pointing
|
||||
``le.wtf`` to 127.0.0.1. You may now run (in a separate terminal)::
|
||||
|
||||
./tests/boulder-integration.sh && echo OK || echo FAIL
|
||||
|
||||
|
||||
+20
-3
@@ -464,7 +464,6 @@ class HelpfulArgumentParser(object):
|
||||
|
||||
"""
|
||||
def __init__(self, args, plugins):
|
||||
self.args = args
|
||||
plugin_names = [name for name, _p in plugins.iteritems()]
|
||||
self.help_topics = HELP_TOPICS + plugin_names + [None]
|
||||
self.parser = configargparse.ArgParser(
|
||||
@@ -477,6 +476,7 @@ class HelpfulArgumentParser(object):
|
||||
self.parser._add_config_file_help = False # pylint: disable=protected-access
|
||||
self.silent_parser = SilentParser(self.parser)
|
||||
|
||||
self.args = self.preprocess_args(args)
|
||||
help1 = self.prescan_for_flag("-h", self.help_topics)
|
||||
help2 = self.prescan_for_flag("--help", self.help_topics)
|
||||
assert max(True, "a") == "a", "Gravity changed direction"
|
||||
@@ -489,6 +489,17 @@ class HelpfulArgumentParser(object):
|
||||
#print self.visible_topics
|
||||
self.groups = {} # elements are added by .add_group()
|
||||
|
||||
def preprocess_args(self, args):
|
||||
"""Work around some limitations in argparse.
|
||||
|
||||
Currently, add the default verb "run" as a default.
|
||||
"""
|
||||
|
||||
for token in args:
|
||||
if token in VERBS:
|
||||
return args
|
||||
return ["run"] + args
|
||||
|
||||
def prescan_for_flag(self, flag, possible_arguments):
|
||||
"""Checks cli input for flags.
|
||||
|
||||
@@ -656,7 +667,12 @@ def create_parser(plugins, args):
|
||||
|
||||
_create_subparsers(helpful)
|
||||
|
||||
return helpful.parser
|
||||
return helpful.parser, helpful.args
|
||||
|
||||
# For now unfortunately this constant just needs to match the code below;
|
||||
# there isn't an elegant way to autogenerate it in time.
|
||||
VERBS = ["run", "auth", "install", "revoke", "rollback", "config_changes",\
|
||||
"plugins"]
|
||||
|
||||
|
||||
def _create_subparsers(helpful):
|
||||
@@ -844,7 +860,8 @@ def main(cli_args=sys.argv[1:]):
|
||||
|
||||
# note: arg parser internally handles --help (and exits afterwards)
|
||||
plugins = plugins_disco.PluginsRegistry.find_all()
|
||||
args = create_parser(plugins, cli_args).parse_args(cli_args)
|
||||
parser, tweaked_cli_args = create_parser(plugins, cli_args)
|
||||
args = parser.parse_args(tweaked_cli_args)
|
||||
config = configuration.NamespaceConfig(args)
|
||||
|
||||
# Setup logging ASAP, otherwise "No handlers could be found for
|
||||
|
||||
@@ -88,7 +88,6 @@ setup(
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Topic :: Internet :: WWW/HTTP',
|
||||
'Topic :: Security',
|
||||
|
||||
Reference in New Issue
Block a user