Commits

Takeshi Komiya committed cf70e1b

Fix failure without --language option

  • Participants
  • Parent commits 02ebc69
  • Tags 0.1.3

Comments (0)

Files changed (2)

 
 setup(
     name='sphinx-gettext-helper',
-    version='0.1.2',
+    version='0.1.3',
     url='http://bitbucket.org/tk0miya/sphinx-gettext-helper',
     download_url='http://pypi.python.org/pypi/sphinx-gettext-helper',
     license='BSD',

sphinx_gettext_helper/command.py

         msg = "language and locale_dirs was not defined: %s" % options.config
         raise RuntimeError(msg)
 
+    if options.language is None:
+        options.language = config['language']
+
+    if options.language is None:
+        msg = "No languages are selected"
+        raise RuntimeError(msg)
+
     options.locale_dir = os.path.join(config['locale_dirs'][0],
                                       options.language, 'LC_MESSAGES')
 
-    if options.language is None:
-        options.language = config['language']
-
     return options, args