Skip to content

Commit

Permalink
Fix pythonic expressions in snf-pithos-backend directory
Browse files Browse the repository at this point in the history
  • Loading branch information
vgerak committed Nov 12, 2014
1 parent 262085d commit c61d1f8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions snf-pithos-backend/pithos/backends/lib/sqlalchemy/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def public_unset_bulk(self, paths):
def public_get(self, path):
s = select([self.public.c.url])
s = s.where(and_(self.public.c.path == path,
self.public.c.active == True))
self.public.c.active is True))
r = self.conn.execute(s)
row = r.fetchone()
r.close()
Expand All @@ -112,7 +112,7 @@ def public_list(self, prefix):
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 == True)
s = s.where(self.public.c.active is True)
r = self.conn.execute(s)
rows = r.fetchall()
r.close()
Expand All @@ -121,7 +121,7 @@ def public_list(self, prefix):
def public_path(self, public):
s = select([self.public.c.path])
s = s.where(and_(self.public.c.url == public,
self.public.c.active == True))
self.public.c.active is True))
r = self.conn.execute(s)
row = r.fetchone()
r.close()
Expand Down
2 changes: 1 addition & 1 deletion snf-pithos-backend/pithos/backends/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def main(argv=None, **kwargs):
exit(1)

# default config arg, if not already set
if not '-c' in argv:
if '-c' not in argv:
argv.insert(0, DEFAULT_ALEMBIC_INI_PATH)
argv.insert(0, '-c')

Expand Down

0 comments on commit c61d1f8

Please sign in to comment.