From 4f4a905609e536c94663e95d68cd04e060a8c5bf Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 7 Apr 2011 17:54:47 +1000 Subject: [PATCH] FTP: Fix issue with RIT hands. RIT hands on FTP have two summary sections. If a player is sitting out and needs to be removed from the player list, they were removed twice. The second remove from a python dict is a crash. Patch avoids this situation --- pyfpdb/FulltiltToFpdb.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pyfpdb/FulltiltToFpdb.py b/pyfpdb/FulltiltToFpdb.py index 328ae4fa..7c51c5d5 100755 --- a/pyfpdb/FulltiltToFpdb.py +++ b/pyfpdb/FulltiltToFpdb.py @@ -356,8 +356,9 @@ class Fulltilt(HandHistoryConverter): # Remove any listed as sitting out in the summary as start of hand info unreliable n = self.re_SummarySitout.finditer(post) for b in n: - del plist[b.group('PNAME')] - #print "DEBUG: Deleting '%s' from player dict" %(b.group('PNAME')) + if b.group('PNAME') in plist: + #print "DEBUG: Deleting '%s' from player dict" %(b.group('PNAME')) + del plist[b.group('PNAME')] # Add remaining players for a in plist: