From c925b483c72da36eaa786378d1f9b5489eab58e5 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 17 Aug 2004 06:45:24 +0000 Subject: [PATCH] Slightly better error message. --- scripts/supybot | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/supybot b/scripts/supybot index a01f4d0a8..98568c051 100755 --- a/scripts/supybot +++ b/scripts/supybot @@ -54,6 +54,7 @@ signal.signal(signal.SIGTERM, signalHandler) import time import optparse +import textwrap started = time.time() @@ -181,8 +182,12 @@ if __name__ == '__main__': registry.open(registryFilename) shutil.copy(registryFilename, registryFilename + '.bak') except registry.InvalidRegistryFile, e: - sys.stderr.write(str(e)) + s = '%s in %s. ' % (e, registryFilename) + s += 'Please fix this error and start Supybot again.' + s = textwrap.fill(s) + sys.stderr.write(s) sys.stderr.write(os.linesep) + raise sys.exit(-1) except EnvironmentError, e: sys.stderr.write(str(e))