The start parameter for enumerate()
Since python version 2.6 the start parameter was added and can be used
This commit is contained in:
@@ -125,10 +125,9 @@ class Scanner(object):
|
||||
Color.p('\r')
|
||||
|
||||
Target.print_header()
|
||||
for (index, target) in enumerate(self.targets):
|
||||
index += 1
|
||||
for idx, target in enumerate(self.targets, start=1):
|
||||
Color.clear_entire_line()
|
||||
Color.pl(' {G}%s %s' % (str(index).rjust(3), target))
|
||||
Color.pl(' {G}%s %s' % (str(idx).rjust(3), target))
|
||||
|
||||
@staticmethod
|
||||
def get_terminal_height():
|
||||
|
||||
Reference in New Issue
Block a user