mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
fix bug when certbot is ran without any arguments (#4151)
This commit is contained in:
parent
0070489843
commit
b5d4e0bf6a
2 changed files with 6 additions and 1 deletions
|
|
@ -439,7 +439,7 @@ class HelpfulArgumentParser(object):
|
|||
self.detect_defaults = detect_defaults
|
||||
self.args = args
|
||||
|
||||
if self.args[0] == 'help':
|
||||
if self.args and self.args[0] == 'help':
|
||||
self.args[0] = '--help'
|
||||
|
||||
self.determine_verb()
|
||||
|
|
|
|||
|
|
@ -60,6 +60,11 @@ class ParseTest(unittest.TestCase):
|
|||
self.assertRaises(SystemExit, self.parse, args, output)
|
||||
return output.getvalue()
|
||||
|
||||
def test_no_args(self):
|
||||
namespace = self.parse([])
|
||||
for d in ('config_dir', 'logs_dir', 'work_dir'):
|
||||
self.assertEqual(getattr(namespace, d), cli.flag_default(d))
|
||||
|
||||
def test_install_abspath(self):
|
||||
cert = 'cert'
|
||||
key = 'key'
|
||||
|
|
|
|||
Loading…
Reference in a new issue