diff --git a/pyfpdb/GuiBulkImport.py b/pyfpdb/GuiBulkImport.py old mode 100755 new mode 100644 diff --git a/pyfpdb/Hud.py b/pyfpdb/Hud.py index 804d8ed2..b2266213 100644 --- a/pyfpdb/Hud.py +++ b/pyfpdb/Hud.py @@ -176,7 +176,7 @@ class Hud: loc = self.config.get_locations(self.table.site, self.max) # TODO: is stat_windows getting converted somewhere from a list to a dict, for no good reason? for i, w in enumerate(self.stat_windows.itervalues()): - (x, y) = loc[adj[i]] + (x, y) = loc[adj[i+1]] w.relocate(x, y) return True diff --git a/pyfpdb/fpdb_simple.py b/pyfpdb/fpdb_simple.py index d9aeb8ec..b9d914b2 100644 --- a/pyfpdb/fpdb_simple.py +++ b/pyfpdb/fpdb_simple.py @@ -1413,17 +1413,12 @@ def recognisePlayerIDs(cursor, names, site_id): if len(ids) != len(names): notfound = [n for n in names if n not in ids] # make list of names not in database if notfound: # insert them into database - namestring = "name=%s" - for x in xrange(len(notfound)-1): - namestring += " OR name=%s" -# print "namestring=",namestring,"\nnotfound=", notfound cursor.executemany("INSERT INTO Players (name, siteId) VALUES (%s, "+str(site_id)+")", (notfound)) q2 = "SELECT name,id FROM Players WHERE name=%s" % " OR name=".join(["%s" for n in notfound]) cursor.execute(q2, notfound) # get their new ids tmp = dict(cursor.fetchall()) for n in tmp: # put them all into the same dict ids[n] = tmp[n] -# print "ids=", ids # return them in the SAME ORDER that they came in in the names argument, rather than the order they came out of the DB return [ids[n] for n in names] #end def recognisePlayerIDs