diff options
author | emkael <emkael@tlen.pl> | 2019-05-22 23:02:27 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2019-05-22 23:02:27 +0200 |
commit | 319330ef6f14708161a18d27fbaa1f7c5b239309 (patch) | |
tree | 2dbf78883763001c8e07b07d6b2e457b78768f3a | |
parent | 9ffb849db7ec3b7a84b0f3cd61f33203454a10bf (diff) |
Sorting PBN output by board number
-rw-r--r-- | dealconvert/formats/pbn.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dealconvert/formats/pbn.py b/dealconvert/formats/pbn.py index f1d3042..2f3be71 100644 --- a/dealconvert/formats/pbn.py +++ b/dealconvert/formats/pbn.py @@ -88,7 +88,7 @@ class PBNFormat(DealFormat): return result def output_content(self, out_file, dealset): - for board in dealset: + for board in sorted(dealset, key=lambda d:d.number): out_file.write('[Event "%s"]\r\n' % (board.event)) out_file.write('[Board "%d"]\r\n' % (board.number)) out_file.write('[Dealer "%s"]\r\n' % ( |