From c740f87c678517400de48a8bb79d4ed4727ec82f Mon Sep 17 00:00:00 2001 From: Alexander Lakhin Date: Thu, 6 Feb 2014 20:09:59 +0400 Subject: [PATCH] Fix repository lookup error --- analyze-repo-redundancy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/analyze-repo-redundancy.py b/analyze-repo-redundancy.py index 2f5a83e..89e5072 100755 --- a/analyze-repo-redundancy.py +++ b/analyze-repo-redundancy.py @@ -44,8 +44,8 @@ def main(args): rid = c.execute(""" SELECT id FROM repodirs WHERE name = ? OR path = ? """, [repo, repo]).fetchall() - if rid is None: - print 'Repository "%" not found.' % repo + if not rid: + print 'Repository "%s" not found.' % repo exit(1) repodirs.append(rid[0][0]) if not repodirs: