mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 16:15:42 +02:00
(cherry picked from commit b5d4e0bf6a)
This commit is contained in:
+1
-1
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user