From 9d1214d604a3310e0e7d65223b0a703f1c8a913a Mon Sep 17 00:00:00 2001 From: Eric House Date: Mon, 28 Jun 2021 12:37:37 -0700 Subject: [PATCH] hide dup details when no dupe games present --- xwords4/linux/scripts/discon_ok2.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/xwords4/linux/scripts/discon_ok2.py b/xwords4/linux/scripts/discon_ok2.py index 4e121a4b4..88476b554 100755 --- a/xwords4/linux/scripts/discon_ok2.py +++ b/xwords4/linux/scripts/discon_ok2.py @@ -588,9 +588,12 @@ def summarizeTileCounts(devs, endTime, state, changeSecs): fmtData[2]['data'].append(txt) print('') - print('devs left: {}; bag tiles left: {} (std: {}, dup: {}); total launches: {}; {}/{}' - .format(nDevs, totalTilesStd + totalTilesDup, totalTilesStd, totalTilesDup, - nLaunches, datetime.datetime.now(), endTime )) + if totalTilesDup: dupDetails = ' (std: {}, dup: {})'.format(totalTilesStd, totalTilesDup) + else: dupDetails = '' + # here + print('devs left: {nDevs}; bag tiles left: {total}{details}; total launches: {nLaunches}; {now}/{endTime}' \ + .format(nDevs=nDevs, total=totalTilesStd + totalTilesDup, details=dupDetails, \ + nLaunches=nLaunches, now=datetime.datetime.now(), endTime=endTime )) fmt = '{head:>%d} {data}' % headWidth for datum in fmtData: datum['data'] = ' '.join(datum['data']) for datum in fmtData: