예제 #1
0
 def dump(self, channel, filename):
     filename = conf.supybot.directories.data.dirize(filename)
     fd = utils.transactionalFile(filename)
     out = csv.writer(fd)
     db = self._getDb(channel)
     cursor = db.cursor()
     cursor.execute("""SELECT name, added, subtracted FROM karma""")
     for (name, added, subtracted) in cursor.fetchall():
         out.writerow([name, added, subtracted])
     fd.close()
예제 #2
0
 def dump(self, channel, filename):
     filename = conf.supybot.directories.data.dirize(filename)
     fd = utils.transactionalFile(filename)
     out = csv.writer(fd)
     db = self._getDb(channel)
     cursor = db.cursor()
     cursor.execute("""SELECT name, added, subtracted FROM karma""")
     for (name, added, subtracted) in cursor.fetchall():
         out.writerow([name, added, subtracted])
     fd.close()