changeset 5927:7c6029d23a18

warn if someone gave ... to the moin script, avoids a strange and unhelpful 'empty module name' error message
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 21 Jan 2013 13:41:04 +0100
parents ca07ae758965
children d97e3b0d6b49
files MoinMoin/script/__init__.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/__init__.py	Sat Jan 19 01:48:36 2013 +0100
+++ b/MoinMoin/script/__init__.py	Mon Jan 21 13:41:04 2013 +0100
@@ -243,6 +243,11 @@
 """)
 
         cmd_module, cmd_name = args[:2]
+        if cmd_module == '...':
+            # our docs usually tell to use moin ... cmd_module cmd_name
+            # if somebody enters the ... verbatim, tell him how to do it right:
+            fatal("Wrong invokation. Please do not enter ... verbatim, but give --config-dir and --wiki-url options (see help for more details).")
+
         from MoinMoin import wikiutil
         try:
             plugin_class = wikiutil.importBuiltinPlugin('script.%s' % cmd_module, cmd_name, 'PluginScript')