Add userfriendly warning if credentials.conf is missing

Warn the user and advise what she should be doing to get going.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2012-01-09 14:38:28 +01:00
parent 7b75e04b5b
commit 9a905188f2

View File

@ -37,6 +37,9 @@ class OLITestLib():
snippet for authenticating against the test IMAP server(s).
:param cmd: command that will be executed to invoke offlineimap"""
OLITestLib.cred_file = cred_file
if not os.path.isfile(cred_file):
raise UserWarning("Please copy 'credentials.conf.sample' to '%s' "
"and set your credentials there." % cred_file)
OLITestLib.cmd = cmd
@classmethod