]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
netcmd: Tweak backup-offline output to avoid subunit truncation
authorTim Beale <timbeale@catalyst.net.nz>
Tue, 18 Sep 2018 03:24:36 +0000 (15:24 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 26 Sep 2018 05:49:17 +0000 (07:49 +0200)
Currently a backup-offline test is occasionally flapping in autobuild,
however, the output is truncated so we can't see what the actual problem
is. The output only ever contains the list of backup dirs. I suspect
that the ']' character printed at the end of the python list might be
getting interpretted by subunit as the end of *all* the output.

If so, we should be able to avoid the problem by printing the list items
without the '['/']'s, i.e. join the list into a single string.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/netcmd/domain_backup.py

index bff2bdda783c9b3e5ae969d0d30f4cdedd6ba89f..e87debd8fe9a876b6ad4f029b2c3cd6680ff4e1e 100644 (file)
@@ -917,7 +917,7 @@ class cmd_domain_backup_offline(samba.netcmd.Command):
 
         backup_dirs = [paths.private_dir, paths.state_dir,
                        os.path.dirname(paths.smbconf)]  # etc dir
-        logger.info('running backup on dirs: {}'.format(backup_dirs))
+        logger.info('running backup on dirs: {}'.format(' '.join(backup_dirs)))
 
         # Recursively get all file paths in the backup directories
         all_files = []