cleanup & pep8

svn: r13021
This commit is contained in:
Raphael Ackermann 2009-08-15 14:37:14 +00:00
parent 9aeeb8432c
commit 9239780182
2 changed files with 94 additions and 96 deletions

View File

@ -30,7 +30,6 @@
#-------------------------------------------------------------------------
from __future__ import with_statement
import os
import sys
import cStringIO
from gettext import gettext as _
@ -111,7 +110,7 @@ def _table_low_level(db,table):
)
if not dup_handles:
print " No dupes found for this table"
print " No duplicates found for this table"
return True
# import gen.db
@ -128,9 +127,9 @@ def _table_low_level(db,table):
for count in range(handle_list.count(handle)-1):
try:
table_cursor.delete()
print " Succesfully deleted dupe #%d" % (count+1)
print " Successfully deleted duplicate #%d" % (count+1)
except:
print " Failed deleting dupe."
print " Failed deleting duplicate."
return False
try:
@ -254,7 +253,7 @@ class CheckIntegrity(object):
def cleanup_deleted_name_formats(self):
"""
Permanently remove deleted name formats from db
Permanently remove deleted name formats from db.
When user deletes custom name format those are not removed only marked
as "inactive". This method does the cleanup of the name format table,

View File

@ -162,7 +162,6 @@ class ReorderIds(Tool.BatchTool):
find_next_id, table, commit, prefix):
dups = []
newids = {}
key_list = []
for handle in table.keys():
if self.uistate:
@ -198,7 +197,7 @@ class ReorderIds(Tool.BatchTool):
else:
dups.append(handle)
# go through the duplicates, looking for the first availble
# go through the duplicates, looking for the first available
# handle that matches the new scheme.
if self.uistate: