def postOptions_bind_mandatory(self): if not self.opts["binddn"]: raise usage.UsageError("binddn must be given")
def postOptions(self): if not self['jobdir']: raise usage.UsageError('jobdir is required')
def postOptions(self): super(LeaveOptions, self).postOptions() if self["name"] is None: raise usage.UsageError( "Must specify the --name option" )
def opt_allow_ignore_ext(self): """Specify whether or not a request for 'foo' should return 'foo.ext'""" if not isinstance(self['root'], static.File): raise usage.UsageError("You can only use --allow_ignore_ext " "after --path.") self['root'].ignoreExt('*')
def mamba_services_not_found(): raise usage.UsageError( 'error: make sure you are inside a mamba application root directory ' 'and then run this command again' )
def parseArgs(self, *nodedirs): from allmydata.util.encodingutil import argv_to_abspath self.nodedirs = map(argv_to_abspath, nodedirs) if not nodedirs: raise usage.UsageError("must specify at least one node directory")
def postOptions(self): if self["umask"] is None: self["umask"] = get_umask() if not self["location"]: raise usage.UsageError("--location= is mandatory")
def postOptions(self): if not self["location"]: raise usage.UsageError("--location= is mandatory")
def opt_timestamps(self, arg): if arg not in FORMAT_TIME_MODES: raise usage.UsageError("--timestamps= must be one of (%s)" % ", ".join(FORMAT_TIME_MODES)) self["timestamps"] = arg
def postOptions(self): if not self["maintainer"]: raise usage.UsageError("maintainer must be specified.")
if config['quiet']: stdout = StringIO() so.stdout = stdout so.stderr = stderr so.stdin = stdin if command in create_dispatch: rc = create_dispatch[command](so, stdout, stderr) elif command in startstop_node.dispatch: rc = startstop_node.dispatch[command](so, stdout, stderr) elif command in debug.dispatch: rc = debug.dispatch[command](so) elif command in cli.dispatch: rc = cli.dispatch[command](so) elif command in ac_dispatch: rc = ac_dispatch[command](so, stdout, stderr) else: raise usage.UsageError() return rc def run(install_node_control=True): if sys.platform == "win32": from allmydata.windows.fixups import initialize initialize() rc = runner(sys.argv[1:], install_node_control=install_node_control) sys.exit(rc)
def postOptions(self): MakerBase.postOptions(self) self['usepty'] = int(self['usepty']) self['keepalive'] = int(self['keepalive']) if self['master'].find(":") == -1: raise usage.UsageError("--master must be in the form host:portnum")
def postOptions(self): if self['basedir'] is None: raise usage.UsageError("<basedir> parameter is required") self['basedir'] = os.path.abspath(self['basedir'])
def postOptions_base(self): # check that some things are given if self.opts["base"] is None: raise usage.UsageError("base must be given")
def postOptions(self): if not self['basedir']: raise usage.UsageError( "A base directory for the node must be provided.")
def parseArgs(self, *args): if len(args) < 2: raise usage.UsageError("cp requires at least two arguments") self.sources = map(argv_to_unicode, args[:-1]) self.destination = argv_to_unicode(args[-1])
def opt_version(self): raise usage.UsageError("--version not allowed on subcommands")
def postOptions(self): if self["suboptions"]: self.subOptions = "SubOptionUsage" raise usage.UsageError("usage-error-message")
def postOptions(self): if self['loud']: raise usage.UsageError('THIS IS ME BEING LOUD')
def postOptions(self): if not hasattr(self, 'subOptions'): raise usage.UsageError("must specify a subcommand") # ensure our node-directory is valid _ = self.node_directory
def opt_mime_type(self, defaultType): """Specify the default mime-type for static files.""" if not isinstance(self['root'], static.File): raise usage.UsageError( "You can only use --mime_type after --path.") self['root'].defaultType = defaultType
def postOptions(self): if self['web-port'] is None: raise usage.UsageError( "Must specify a listening endpoint with --web-port")
def postOptions(self): if self['https']: try: from twisted.internet.ssl import DefaultOpenSSLContextFactory except ImportError: raise usage.UsageError("SSL support not installed")
def parseArgs(self, *args): if len(args) > 0: self['master'] = args[0] if len(args) > 1: raise usage.UsageError("I wasn't expecting so many arguments")
def postOptions(self): if not hasattr(self, 'subOptions'): if not hasattr(self, 'no_command_needed'): raise usage.UsageError("must specify a command") sys.exit(0)
def parseOptions(self, arguments): raise usage.UsageError(expectedMessage)
def postOptions(self): if self["name"] is None: raise usage.UsageError( "Must specify the --name option" )
def postOptions(self): if self['telnetPort'] is None and self['sshPort'] is None: raise usage.UsageError( "At least one of --telnetPort and --sshPort must be specified")
def postOptions(self): if not hasattr(self, 'subOptions'): raise usage.UsageError("must specify a subcommand")
def postOptions(self): if not self['local-ivo'] and (self['broadcast'] or self['receive']): raise usage.UsageError("IVOA identifier required (--local-ivo)")