mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-27 21:22:39 +01:00
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:
parent
3cb46ab765
commit
57c3259cca
@ -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):
|
||||
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user