PEP8 radio/util/translate.py
Remove unused imports, fix whitespace, fix undefined variable
This commit is contained in:
@@ -3,9 +3,8 @@
|
||||
|
||||
# Imports
|
||||
import argparse
|
||||
import os
|
||||
import os.path
|
||||
import codecs
|
||||
import sys
|
||||
|
||||
translations = {'cz': [('\\200', u'á'),
|
||||
('\\201', u'č'),
|
||||
@@ -115,7 +114,6 @@ translations = {'cz': [('\\200', u'á'),
|
||||
('\\173', u'~'),
|
||||
('\\036', u'\\n'),
|
||||
('\\035', u'\\t')],
|
||||
|
||||
}
|
||||
|
||||
# Take care of command line options
|
||||
@@ -128,7 +126,7 @@ args = parser.parse_args()
|
||||
|
||||
if args.language not in translations:
|
||||
parser.error(args.language + ' is not a supported language. Try one of the supported ones: ' + str(list(translations.keys())))
|
||||
system.exit()
|
||||
sys.exit()
|
||||
|
||||
if args.reverse:
|
||||
for translation in translations:
|
||||
@@ -160,5 +158,3 @@ for line in in_file.readlines():
|
||||
|
||||
out_file.close()
|
||||
in_file.close()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user