From 2ab942128b8144ce75317a13f91786af13da34f4 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 5 Oct 2008 05:33:22 +0100 Subject: [PATCH] p116 - fixed bug in fpdb_import.py that prevented it from running directly --- docs/known-bugs-and-planned-features.txt | 11 +++++------ pyfpdb/fpdb_import.py | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/known-bugs-and-planned-features.txt b/docs/known-bugs-and-planned-features.txt index 6c1a0018..718138a2 100644 --- a/docs/known-bugs-and-planned-features.txt +++ b/docs/known-bugs-and-planned-features.txt @@ -1,11 +1,10 @@ Everything is subject to change and the order does not indicate priority. Patches for any of these or other features are very welcome, see readme-overview.txt for contacts. Please also see db-todo.txt -alpha6 (release 3Oct-10Oct) +alpha7 (release 11Oct-17Oct) ====== -pgsql recreate doesnt work, and it may not store version field on creation if using sql file with pgadmin. +(carl i think) pgsql recreate doesnt work, and it may not store version field on creation if using sql file with pgadmin. check we're reading mucked cards from PS -ebuild: support pgsql fix HUD config location and update release script accordingly (michael) update website for windows installer @@ -30,15 +29,15 @@ debian/ubuntu package http://www.debian.org/doc/maint-guide/ch-start.en.html howto remote DB move all user docs to webpage (steffen) contributor list on webpage -finish bringing back tourney +stud/razz tourneys, No river stats for stud games? hole/board cards are not correctly stored in the db for stud games HORSE (and presumably other mixed games) hand history files not handled correctly -Some MTTs won't import (rebuys??) -Many STTs won't import +rebuy/addon tourney support before beta =========== +ebuild: support pgsql autoimport doesnt seem to work with just one hand in the file make Database.py display error if wrong or missing db lib Import draw (maybe without HudCache for a start) diff --git a/pyfpdb/fpdb_import.py b/pyfpdb/fpdb_import.py index f4fe56ab..9c52d6bc 100755 --- a/pyfpdb/fpdb_import.py +++ b/pyfpdb/fpdb_import.py @@ -56,17 +56,17 @@ def import_file_dict(options, settings, callHud=False): inputFile=open(options.inputFile, "rU") #connect to DB - if options.settings['db-backend'] == 2: + if settings['db-backend'] == 2: if not mysqlLibFound: raise fpdb_simple.FpdbError("interface library MySQLdb not found but MySQL selected as backend - please install the library or change the config file") db = MySQLdb.connect(host = options.server, user = options.user, passwd = options.password, db = options.database) - elif options.settings['db-backend'] == 3: + elif settings['db-backend'] == 3: if not pgsqlLibFound: raise fpdb_simple.FpdbError("interface library psycopg2 not found but PostgreSQL selected as backend - please install the library or change the config file") db = psycopg2.connect(host = options.server, user = options.user, password = options.password, database = options.database) - elif options.settings['db-backend'] == 4: + elif settings['db-backend'] == 4: pass else: pass @@ -224,5 +224,5 @@ if __name__ == "__main__": (options, sys.argv) = parser.parse_args() - settings={'imp-callFpdbHud':False} + settings={'imp-callFpdbHud':False, 'db-backend':2} import_file_dict(options, settings, False)