File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -454,7 +454,9 @@ def _filter_header(s):
454
454
455
455
tokens = []
456
456
last_token_was_number = False
457
- for token in tokenize .generate_tokens (StringIO (asstr (s )).read ):
457
+ # adding newline as python 2.7.5 workaround
458
+ string = asstr (s ) + "\n "
459
+ for token in tokenize .generate_tokens (StringIO (string ).readline ):
458
460
token_type = token [0 ]
459
461
token_string = token [1 ]
460
462
if (last_token_was_number and
@@ -464,7 +466,8 @@ def _filter_header(s):
464
466
else :
465
467
tokens .append (token )
466
468
last_token_was_number = (token_type == tokenize .NUMBER )
467
- return tokenize .untokenize (tokens )
469
+ # removing newline (see above) as python 2.7.5 workaround
470
+ return tokenize .untokenize (tokens )[:- 1 ]
468
471
469
472
470
473
def _read_array_header (fp , version ):
You can’t perform that action at this time.
0 commit comments