Commit 1c8fdb54 authored by Sofia Papagiannaki's avatar Sofia Papagiannaki
Browse files

pithos: Revert pep8 changes from sqlalchemy ClauseElements

pep8 complains for comparison with boolean in sqlalchemy.sql.expression.ClauseElement
with "E712 comparison to True should be 'if cond is True:' or 'if cond:'"
but sqlalchemy does not understand it otherwise.
parent ec8d1e3c
......@@ -1206,7 +1206,7 @@ class Node(DBWorker):
s = s.where(v.c.serial == a.c.serial)
s = s.where(a.c.domain == domain)
s = s.where(a.c.node == n.c.node)
s = s.where(a.c.is_latest is True)
s = s.where(a.c.is_latest == True)
if paths:
s = s.where(n.c.path.in_(paths))
......
......@@ -118,7 +118,7 @@ class Public(DBWorker):
def public_get(self, path):
s = select([self.public.c.url])
s = s.where(and_(self.public.c.path == path,
self.public.c.active))
self.public.c.active == True))
r = self.conn.execute(s)
row = r.fetchone()
r.close()
......@@ -130,7 +130,7 @@ class Public(DBWorker):
s = select([self.public.c.path, self.public.c.url])
s = s.where(self.public.c.path.like(
self.escape_like(prefix) + '%', escape=ESCAPE_CHAR))
s = s.where(self.public.c.active)
s = s.where(self.public.c.active == True)
r = self.conn.execute(s)
rows = r.fetchall()
r.close()
......@@ -139,7 +139,7 @@ class Public(DBWorker):
def public_path(self, public):
s = select([self.public.c.path])
s = s.where(and_(self.public.c.url == public,
self.public.c.active))
self.public.c.active == True))
r = self.conn.execute(s)
row = r.fetchone()
r.close()
......
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