add class attribute to disable REPL behaviour
This commit is contained in:
parent
cba2f742aa
commit
0ebf8d579d
3 changed files with 16 additions and 4 deletions
|
|
@ -85,6 +85,7 @@ class Monboob(ReplApplication):
|
|||
'smtp': 'localhost',
|
||||
'html': 0}
|
||||
CAPS = ICapMessages
|
||||
DISABLE_REPL = True
|
||||
|
||||
def add_application_options(self, group):
|
||||
group.add_option('-S', '--smtpd', help='run a fake smtpd server and set the port')
|
||||
|
|
@ -98,7 +99,7 @@ class Monboob(ReplApplication):
|
|||
def main(self, argv):
|
||||
self.load_config()
|
||||
|
||||
return self.onecmd(' '.join(argv[1:]))
|
||||
return ReplApplication.main(self, argv)
|
||||
|
||||
def get_email_address_ident(self, msg, header):
|
||||
s = msg.get(header)
|
||||
|
|
|
|||
|
|
@ -28,13 +28,16 @@ class WeboobCli(ReplApplication):
|
|||
APPNAME = 'weboob-cli'
|
||||
VERSION = '0.2'
|
||||
COPYRIGHT = 'Copyright(C) 2010 Romain Bignon'
|
||||
SYNOPSIS = 'Usage: %prog [-dqv] [-b backends] [-cnfs] capability method [arguments..]\n'
|
||||
SYNOPSIS += ' %prog [--help] [--version]'
|
||||
DISABLE_REPL = True
|
||||
|
||||
def load_default_backends(self):
|
||||
pass
|
||||
|
||||
def main(self, argv):
|
||||
if len(argv) < 3:
|
||||
print >>sys.stderr, "Syntax: %s capability command [args ..]" % argv[0]
|
||||
print >>sys.stderr, "Syntax: %s capability method [args ..]" % argv[0]
|
||||
return 1
|
||||
|
||||
cap_s = argv[1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue