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:
parent
7b75e04b5b
commit
9a905188f2
@ -37,6 +37,9 @@ class OLITestLib():
|
|||||||
snippet for authenticating against the test IMAP server(s).
|
snippet for authenticating against the test IMAP server(s).
|
||||||
:param cmd: command that will be executed to invoke offlineimap"""
|
:param cmd: command that will be executed to invoke offlineimap"""
|
||||||
OLITestLib.cred_file = cred_file
|
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
|
OLITestLib.cmd = cmd
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
Loading…
Reference in New Issue
Block a user