Assignment before use (if Enumerate fails)

pull/16/head
Alexandre Dulaunoy 2014-08-18 15:58:06 +02:00
parent ebef13fa5b
commit 7d8ee102a3
1 changed files with 1 additions and 0 deletions

View File

@ -117,6 +117,7 @@ class Paste(object):
if self.p_nb_lines is None or self.p_max_length_line is None: if self.p_nb_lines is None or self.p_max_length_line is None:
max_length_line = 0 max_length_line = 0
f = self.get_p_content_as_file() f = self.get_p_content_as_file()
line_id = 0
for line_id, line in enumerate(f): for line_id, line in enumerate(f):
length = len(line) length = len(line)
if length >= max_length_line: if length >= max_length_line: