summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2019-05-22 23:02:27 +0200
committeremkael <emkael@tlen.pl>2019-05-22 23:02:27 +0200
commit319330ef6f14708161a18d27fbaa1f7c5b239309 (patch)
tree2dbf78883763001c8e07b07d6b2e457b78768f3a
parent9ffb849db7ec3b7a84b0f3cd61f33203454a10bf (diff)
Sorting PBN output by board number
-rw-r--r--dealconvert/formats/pbn.py2
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' % (