From 710fd8dde2e874590e37bd4f0b1adefdea691a40 Mon Sep 17 00:00:00 2001 From: Steffen Schaumburg Date: Wed, 2 Mar 2011 02:55:52 +0100 Subject: [PATCH 1/3] a couple of string corrections --- pyfpdb/Configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index 365f7c4a..e0e945fb 100644 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -163,8 +163,8 @@ def get_logger(file_name, config = "config", fallback = False, log_dir=None, log log = logging.basicConfig(filename=file, level=logging.INFO) log = logging.getLogger() # but it looks like default is no output :-( maybe because all the calls name a module? - log.debug(_("Default logger initialised for ")+file) - print _("Default logger intialised for ")+file + log.debug(_("Default logger initialised for %s") % file) + print(_("Default logger initialised for %s") % file) return log def check_dir(path, create = True): From e88fb251380cd06dfaac9236cbd4b5a051009c1a Mon Sep 17 00:00:00 2001 From: Steffen Schaumburg Date: Wed, 2 Mar 2011 03:15:15 +0100 Subject: [PATCH 2/3] string change --- pyfpdb/Configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/Configuration.py b/pyfpdb/Configuration.py index e0e945fb..e350b49b 100644 --- a/pyfpdb/Configuration.py +++ b/pyfpdb/Configuration.py @@ -834,7 +834,7 @@ class Config: try: example_doc = xml.dom.minidom.parse(example_file) except: - log.error(_("Error parsing example file %s. See error log file.") % (example_file)) + log.error(_("Error parsing example configuration file %s. See error log file.") % (example_file)) return nodes_added for cnode in doc.getElementsByTagName("FreePokerToolsConfig"): From c03d050337fd7195ba089aca3441e310491db7fc Mon Sep 17 00:00:00 2001 From: Steffen Schaumburg Date: Wed, 2 Mar 2011 07:03:09 +0100 Subject: [PATCH 3/3] string consistency fixes --- pyfpdb/Database.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyfpdb/Database.py b/pyfpdb/Database.py index b2a4347c..9812300b 100644 --- a/pyfpdb/Database.py +++ b/pyfpdb/Database.py @@ -1169,7 +1169,7 @@ class Database: for idx in self.indexes[self.backend]: if idx['drop'] == 1: if self.backend == self.MYSQL_INNODB: - print _("Creating mysql index %s %s") % (idx['tab'], idx['col']) + print _("Creating MySQL index %s %s") % (idx['tab'], idx['col']) try: s = "alter table %s add index %s(%s)" % (idx['tab'],idx['col'],idx['col']) c.execute(s) @@ -1178,7 +1178,7 @@ class Database: elif self.backend == self.PGSQL: # pass # mod to use tab_col for index name? - print _("Creating pg index "), idx['tab'], idx['col'] + print _("Creating PostgreSQL index "), idx['tab'], idx['col'] try: s = "create index %s_%s_idx on %s(%s)" % (idx['tab'], idx['col'], idx['tab'], idx['col']) c.execute(s) @@ -1423,22 +1423,22 @@ class Database: if cons: pass else: - print _("creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol'] + print _("Creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol'] try: c.execute("alter table " + fk['fktab'] + " add foreign key (" + fk['fkcol'] + ") references " + fk['rtab'] + "(" + fk['rcol'] + ")") except: - print _(" create foreign key failed: ") + str(sys.exc_info()) + print _("Create foreign key failed: ") + str(sys.exc_info()) elif self.backend == self.PGSQL: - print _("creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol'] + print _("Creating foreign key "), fk['fktab'], fk['fkcol'], "->", fk['rtab'], fk['rcol'] try: c.execute("alter table " + fk['fktab'] + " add constraint " + fk['fktab'] + '_' + fk['fkcol'] + '_fkey' + " foreign key (" + fk['fkcol'] + ") references " + fk['rtab'] + "(" + fk['rcol'] + ")") except: - print _(" create foreign key failed: ") + str(sys.exc_info()) + print _("Create foreign key failed: ") + str(sys.exc_info()) else: print _("Only MySQL and Postgres supported so far")