]>
code.delx.au - offlineimap/blob - offlineimap/head/offlineimap/ui/Noninteractive.py
62f1603e12ece9b365fcbf0cfa26291cb5f09bc9
2 # Copyright (C) 2002 John Goerzen
3 # <jgoerzen@complete.org>
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; version 2 of the License.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 from UIBase
import UIBase
22 def getpass(s
, accountname
, config
, errmsg
= None):
23 raise NotImplementedError, "Prompting for a password is not supported in noninteractive mode."
29 def warn(s
, msg
, minor
= 0):
33 sys
.stderr
.write(warntxt
+ ": " + str(msg
) + "\n")
35 def sleep(s
, sleepsecs
):
37 s
._msg
("Sleeping for %d:%02d" % (sleepsecs
/ 60, sleepsecs
% 60))
38 UIBase
.sleep(s
, sleepsecs
)
40 def sleeping(s
, sleepsecs
, remainingsecs
):
46 def __init__(s
, config
, verbose
= -1):
47 Basic
.__init
__(s
, config
, verbose
)