Commit 455a2481 authored by Wolfgang Rohdewald's avatar Wolfgang Rohdewald
Browse files

pylint: comparisons

parent fbae2067
......@@ -740,7 +740,7 @@ class Game:
self.debug(' %s' % (line))
for player2 in self.players:
if id(player1) != id(player2):
if player1.wind == East or player2.wind == East:
if East in (player1.wind, player2.wind):
efactor = 2
else:
efactor = 1
......@@ -891,7 +891,7 @@ class PlayingGame(Game):
else:
host = None
if seed == 'proposed' or seed == host:
if seed in ('proposed', host):
# we reserved the game id by writing a record with seed == host
Game.saveStartTime(self)
......
......@@ -198,7 +198,7 @@ class DBHandle(sqlite3.Connection):
@staticmethod
def hasTable(table):
"""does the table contain table?"""
return bool(len(Query('SELECT name FROM sqlite_master WHERE type="table" AND name="%s"' % table).records))
return len(Query('SELECT name FROM sqlite_master WHERE type="table" AND name="%s"' % table).records) > 0
def tableHasField(self, table, field):
"""does the table contain a column named field?"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment