]>
code.delx.au - offlineimap/blob - offlineimap/ui/Noninteractive.py
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; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 from UIBase
import UIBase
23 def getpass(s
, accountname
, config
, errmsg
= None):
24 raise NotImplementedError, "Prompting for a password is not supported in noninteractive mode."
30 def warn(s
, msg
, minor
= 0):
34 sys
.stderr
.write(warntxt
+ ": " + str(msg
) + "\n")
36 def sleep(s
, sleepsecs
):
38 s
._msg
("Sleeping for %d:%02d" % (sleepsecs
/ 60, sleepsecs
% 60))
39 UIBase
.sleep(s
, sleepsecs
)
41 def sleeping(s
, sleepsecs
, remainingsecs
):
47 def __init__(s
, config
, verbose
= -1):
48 Basic
.__init
__(s
, config
, verbose
)