Get rid of the stdout logs as they obscure the scripts' messages. Also, do

some more sanity checking of the arguments to fundbConvert.
This commit is contained in:
James Vega 2005-01-03 21:04:51 +00:00
parent 3cb46ab765
commit 57c3259cca
2 changed files with 10 additions and 0 deletions

View File

@ -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 <sqlitedb> <channel> [<botname>]' % sys.argv[0]
print '<botname> 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):

View File

@ -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 <sqlitedb>' % sys.argv[0]