Skip to content

Commit

Permalink
don't use keywords as variables
Browse files Browse the repository at this point in the history
  • Loading branch information
borysn committed Jun 18, 2017
1 parent 2798df5 commit 96a7689
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions eprl/dbstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,20 @@ def removeItems(self, itemNums):
# init return
removed = []
# store resume list locally
list = self.db[self.target]['mergelist']
tmpList = self.db[self.target]['mergelist']
# remove all item nums form the resume list
# new list with removed items
tmp = []
newList = []
# iterate all item numbers building new list with ommitted items
for i in range(len(list)):
for i in range(len(tmpList)):
# ommit item?
if i in itemNums:
removed.append(list[i][2])
removed.append(tmpList[i][2])
else:
# don't ommit item
tmp.append(list[i])
newList.append(tmpList[i])
# save new mergelist
self.db[self.target]['mergelist'] = tmp
self.db[self.target]['mergelist'] = newList
# write changes to disk
self.db.commit()
# return list of removed item package names
Expand Down

0 comments on commit 96a7689

Please sign in to comment.