Skip to content

Commit 5172bda

Browse files
committed
Updated manage_translations script
1 parent 384ddbe commit 5172bda

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Diff for: scripts/manage_translations.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,11 @@ def fetch(resources=None, languages=None):
168168
RUNABLE_SCRIPTS = ('update_catalogs', 'lang_stats', 'fetch')
169169

170170
parser = ArgumentParser()
171-
parser.add_argument('cmd', nargs=1)
171+
parser.add_argument('cmd', nargs=1, choices=RUNABLE_SCRIPTS)
172172
parser.add_argument("-r", "--resources", action='append',
173173
help="limit operation to the specified resources")
174174
parser.add_argument("-l", "--languages", action='append',
175175
help="limit operation to the specified languages")
176176
options = parser.parse_args()
177177

178-
if options.cmd[0] in RUNABLE_SCRIPTS:
179-
eval(options.cmd[0])(options.resources, options.languages)
180-
else:
181-
print("Available commands are: %s" % ", ".join(RUNABLE_SCRIPTS))
178+
eval(options.cmd[0])(options.resources, options.languages)

0 commit comments

Comments
 (0)