samba-tool domain: Run in interactive mode if no args are supplied
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 25 Apr 2023 22:31:51 +0000 (10:31 +1200)
committerJule Anger <janger@samba.org>
Fri, 26 May 2023 12:34:17 +0000 (12:34 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15363

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(backported from commit f1281b80c1ad68d380ce91c13076f6a60fbc627e)

[jsutton@samba.org Adapted to provisioning code refactor in commit
 5986937d12c237121d4e62fa6dfa0f5dadec263d]

python/samba/netcmd/domain.py

index 582a17f0fff5fc25ff340919c66dc240442de28a..1b279a598d88a04513a538de3b428e6e0cc1e8ea 100644 (file)
@@ -392,7 +392,7 @@ class cmd_domain_provision(Command):
             if suggested_forwarder is None:
                 suggested_forwarder = "none"
 
-        if len(self.raw_argv) == 1:
+        if not self.raw_argv:
             interactive = True
 
         if interactive: