Fix repository lookup error

This commit is contained in:
Alexander Lakhin 2014-02-06 20:09:59 +04:00
parent 21a5ec6090
commit c740f87c67

View file

@ -44,8 +44,8 @@ def main(args):
rid = c.execute(""" rid = c.execute("""
SELECT id FROM repodirs WHERE name = ? OR path = ? SELECT id FROM repodirs WHERE name = ? OR path = ?
""", [repo, repo]).fetchall() """, [repo, repo]).fetchall()
if rid is None: if not rid:
print 'Repository "%" not found.' % repo print 'Repository "%s" not found.' % repo
exit(1) exit(1)
repodirs.append(rid[0][0]) repodirs.append(rid[0][0])
if not repodirs: if not repodirs: