From 57c3259cca8935f56bfbc1995ccc859153a4fc90 Mon Sep 17 00:00:00 2001 From: James Vega Date: Mon, 3 Jan 2005 21:04:51 +0000 Subject: [PATCH] Get rid of the stdout logs as they obscure the scripts' messages. Also, do some more sanity checking of the arguments to fundbConvert. --- tools/fundbConvert.py | 7 +++++++ tools/noteConvert.py | 3 +++ 2 files changed, 10 insertions(+) diff --git a/tools/fundbConvert.py b/tools/fundbConvert.py index 8b8da888c..c84648830 100755 --- a/tools/fundbConvert.py +++ b/tools/fundbConvert.py @@ -4,9 +4,13 @@ import sys import sqlite import supybot.dbi as dbi +import supybot.conf as conf +import supybot.ircutils as ircutils import supybot.plugins.Lart as Lart import supybot.plugins.Praise as Praise +conf.supybot.log.stdout.setValue(False) + def usage(): print 'usage: %s []' % sys.argv[0] print ' is an optional parameter used if any db entries are '\ @@ -18,6 +22,9 @@ def main(): sys.exit(1) sqldb = sys.argv[1] channel = sys.argv[2] + if not ircutils.isChannel(channel): + print '%s is an invalid channel name.' + sys.exit(1) if len(sys.argv) >= 4: botname = sys.argv[3] if not os.path.exists(sqldb): diff --git a/tools/noteConvert.py b/tools/noteConvert.py index 8036063c2..6be4251a0 100755 --- a/tools/noteConvert.py +++ b/tools/noteConvert.py @@ -4,8 +4,11 @@ import sys import sqlite import supybot.dbi as dbi +import supybot.conf as conf import supybot.plugins.Note as Note +conf.supybot.log.stdout.setValue(False) + def main(): if '-h' in sys.argv or '--help' in sys.argv or len(sys.argv) != 2: print 'usage: %s ' % sys.argv[0]