Skip to content

Commit

Permalink
remove_space.py only handled correctly last class
Browse files Browse the repository at this point in the history
Added .rstrip("\n") at line reading so that it reads properly all clases, instead of only the last one which does not contain the "\n" character.
  • Loading branch information
laxos96 authored Jun 11, 2018
1 parent 6f78b0b commit 66fbfe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extra/remove_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def rename_class(current_class_name, new_class_name):

with open('class_list.txt') as f:
for line in f:
current_class_name = line
current_class_name = line.rstrip("\n")
new_class_name = line.replace(' ', args.delimiter)
if line == new_class_name:
continue
Expand All @@ -94,4 +94,4 @@ def rename_class(current_class_name, new_class_name):
os.chdir("../predicted")
rename_class(current_class_name, new_class_name)

print('Done!')
print('Done!')

0 comments on commit 66fbfe9

Please sign in to comment.