From 9a905188f231478f690ed95fd5d4356348835ced Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Mon, 9 Jan 2012 14:38:28 +0100 Subject: [PATCH] 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 --- test/OLItest/TestRunner.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/OLItest/TestRunner.py b/test/OLItest/TestRunner.py index f984471..5235949 100644 --- a/test/OLItest/TestRunner.py +++ b/test/OLItest/TestRunner.py @@ -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