From: Tim Beale Date: Tue, 18 Sep 2018 03:24:36 +0000 (+1200) Subject: netcmd: Tweak backup-offline output to avoid subunit truncation X-Git-Tag: tdb-1.3.17~1509 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2055b710abe768bfb170987f38f05af1a35df866;p=thirdparty%2Fsamba.git netcmd: Tweak backup-offline output to avoid subunit truncation 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 Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/netcmd/domain_backup.py b/python/samba/netcmd/domain_backup.py index bff2bdda783..e87debd8fe9 100644 --- a/python/samba/netcmd/domain_backup.py +++ b/python/samba/netcmd/domain_backup.py @@ -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 = []