From d1f25d359a46b0b1e30405b5ba139e2811790fda Mon Sep 17 00:00:00 2001 From: Victor Häggqvist Date: Mon, 18 May 2015 19:27:42 +0200 Subject: fix dict name conflict --- xboomx/bin/xboomx_sort.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xboomx/bin/xboomx_sort.py b/xboomx/bin/xboomx_sort.py index 3b78d83..0ddfa04 100755 --- a/xboomx/bin/xboomx_sort.py +++ b/xboomx/bin/xboomx_sort.py @@ -8,9 +8,9 @@ def main(): session = get_session() dbitems = session.query(PathItem).all() - items = {} + memitems = {} for i in dbitems: - items[i.name] = i.count + memitems[i.name] = i.count # read lines and set weight according to db items = [] @@ -18,7 +18,8 @@ def main(): input_item = input_item.strip('\n') try: - count = items[input_item] + + count = memitems[input_item] items.append((count, input_item)) except KeyError: items.append((0, input_item)) -- cgit v1.2.3