From bc15025be559ef1567a59306a8a5ac903d3f93bf Mon Sep 17 00:00:00 2001 From: steffen123 Date: Wed, 15 Oct 2008 18:20:33 +0100 Subject: [PATCH] p135 - updated tv --- ...b-1.0_alpha5_p110.ebuild => fpdb-1.0_alpha7_p135.ebuild} | 2 +- pyfpdb/CliFpdb.py | 1 + pyfpdb/GuiTableViewer.py | 6 ++++-- pyfpdb/fpdb.py | 2 +- pyfpdb/fpdb_import.py | 1 + pyfpdb/fpdb_simple.py | 4 +++- 6 files changed, 11 insertions(+), 5 deletions(-) rename packaging/gentoo/{fpdb-1.0_alpha5_p110.ebuild => fpdb-1.0_alpha7_p135.ebuild} (97%) diff --git a/packaging/gentoo/fpdb-1.0_alpha5_p110.ebuild b/packaging/gentoo/fpdb-1.0_alpha7_p135.ebuild similarity index 97% rename from packaging/gentoo/fpdb-1.0_alpha5_p110.ebuild rename to packaging/gentoo/fpdb-1.0_alpha7_p135.ebuild index 4e55238e..07fbb188 100644 --- a/packaging/gentoo/fpdb-1.0_alpha5_p110.ebuild +++ b/packaging/gentoo/fpdb-1.0_alpha7_p135.ebuild @@ -1,7 +1,7 @@ # Copyright 1999-2008 Gentoo Foundation # Gentoo had nothing to do with the production of this ebuild, but I'm pre-emptively transferring all copyrights (as far as legally possible under my local jurisdiction) to them. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-util/fpdb/fpdb-1.0_alpha5_p110.ebuild,v 1.0 2008/09/26 steffen@sycamoretest.info Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-util/fpdb/fpdb-1.0_alpha7_p135.ebuild,v 1.0 2008/10/15 steffen@sycamoretest.info Exp $ NEED_PYTHON=2.3 diff --git a/pyfpdb/CliFpdb.py b/pyfpdb/CliFpdb.py index 75dd1251..47649728 100755 --- a/pyfpdb/CliFpdb.py +++ b/pyfpdb/CliFpdb.py @@ -59,6 +59,7 @@ if __name__ == "__main__": settings['db-password']=options.password settings['db-databaseName']=options.database settings['handCount']=options.handCount + settings['failOnError']=options.failOnError importer = fpdb_import.Importer(options, settings) importer.addImportFile(options.inputFile) diff --git a/pyfpdb/GuiTableViewer.py b/pyfpdb/GuiTableViewer.py index f2bfecd9..1082bff1 100644 --- a/pyfpdb/GuiTableViewer.py +++ b/pyfpdb/GuiTableViewer.py @@ -220,7 +220,7 @@ class GuiTableViewer (threading.Thread): #print "start of table_viewer.read_names_clicked" self.db.reconnect() self.cursor=self.db.cursor - self.hands_id=self.last_read_hand_id + #self.hands_id=self.last_read_hand_id self.db.cursor.execute("SELECT gametypeId FROM Hands WHERE id=%s", (self.hands_id, )) self.gametype_id=self.db.cursor.fetchone()[0] @@ -257,7 +257,9 @@ class GuiTableViewer (threading.Thread): self.importer.setFailOnError(False) self.importer.setHandCount(0) - self.last_read_hand_id=self.importer.import_file_dict() + self.importer.addImportFile(self.inputFile) + self.importer.runImport() + self.hands_id=self.importer.handsId #end def table_viewer.import_clicked def all_clicked(self, widget, data): diff --git a/pyfpdb/fpdb.py b/pyfpdb/fpdb.py index e1440601..d3642bb5 100755 --- a/pyfpdb/fpdb.py +++ b/pyfpdb/fpdb.py @@ -426,7 +426,7 @@ This program is licensed under the AGPL3, see docs"""+os.sep+"agpl-3.0.txt") self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("delete_event", self.delete_event) self.window.connect("destroy", self.destroy) - self.window.set_title("Free Poker DB - version: alpha6+, p131 or higher") + self.window.set_title("Free Poker DB - version: alpha6+, p135 or higher") self.window.set_border_width(1) self.window.set_size_request(1020,400) self.window.set_resizable(True) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index b652f204..c622a526 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -267,6 +267,7 @@ class Importer: handsId=0 #todo: this will cause return of an unstored hand number if the last hand was error or partial self.db.commit() + self.handsId=handsId return handsId #end def import_file_dict diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index 39de0c9e..217b9163 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -315,10 +315,12 @@ def filterAnteBlindFold(site,hand): #removes useless lines as well as trailing spaces def filterCrap(site, hand, isTourney): - #remove one trailing space at end of line + #remove two trailing spaces at end of line for i in range (len(hand)): if (hand[i][-1]==' '): hand[i]=hand[i][:-1] + if (hand[i][-1]==' '): + hand[i]=hand[i][:-1] #print "hand after trailing space removal in filterCrap:",hand #general variable position word filter/string filter