Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(33)  |  Call(29)  |  Derive(0)  |  Import(4)

src/a/r/ardj-1.2.1/src/ardj/tracks.py   ardj(Download)
    for filename in filenames:
        add_file(filename, add_labels)
        ardj.database.commit()
        os.unlink(filename)
        success.append(os.path.basename(filename))
    ardj.database.execute("INSERT INTO `labels` (`track_id`, `email`, `label`) SELECT id, \'ardj\', ? FROM tracks WHERE length > ?", (tag, length, ))
    count = ardj.database.fetch('SELECT COUNT(*) FROM labels WHERE label = ?', (tag, ))[0][0]
    ardj.database.commit()
    return length, count
 
 
    ardj.database.execute("INSERT INTO download_queue (artist, owner) VALUES (?, ?)", (artist, owner, ))
    ardj.database.commit()
 
    return u"Это займёт какое-то время, я сообщу о результате."
        logging.debug("Updated track %u with: %s" % (track["id"], info))
 
        ardj.database.commit()
 
 
 
    ardj.database.execute(u"DELETE FROM download_queue WHERE artist = ?", (artist_name, ))
    ardj.database.commit()
 
 

src/a/r/ardj-1.2.1/src/ardj/cli.py   ardj(Download)
def cmd_db_purge(*args):
    """deletes dead data from the database"""
    from ardj import database
    database.Open().purge()
    database.commit()
        track = tracks.get_next_track()
        if track is not None:
            database.commit()
            print track["filepath"].encode("utf-8")
            return
    database.Open().purge()
    tracks.purge()
    database.commit()
 
 
def cmd_update_schedule(*args):
    """looks for events in the Last.fm database"""
    from ardj import database, tout
    tout.update_schedule(refresh="--refresh" in args)
    database.commit()
def cmd_update_track_weights(*args):
    """shift current weights to real weights"""
    from ardj import database, tracks
    tracks.update_real_track_weights()
    database.commit()

src/a/r/ardj-1.2.1/src/ardj/scrobbler.py   ardj(Download)
                return False
            ardj.database.execute('UPDATE playlog SET lastfm = 1 WHERE ts = ?', (ts, ))
            ardj.database.commit()  # prevent hanging transactions
        return True
 
                return False
            ardj.database.execute('UPDATE playlog SET librefm = 1 WHERE ts = ?', (ts, ))
            ardj.database.commit()  # prevent hanging transactions
        return True
 

src/a/r/ardj-1.2.1/src/ardj/jabber.py   ardj(Download)
 
        try:
            ardj.database.commit()
        except Exception, e:
            logging.error("Could not commit changes: %s." % e)
                ardj.log.log_error("ERROR: %s, MESSAGE: %s" % (e, mess.getBody().encode("utf-8")), e)
                rep = unicode(e)
            ardj.database.commit()
            if isinstance(rep, (str, unicode)):
                self.send_simple_reply(mess, rep.strip())
                commit = True
            if commit:
                ardj.database.commit()
        except Exception, e:
            ardj.log.log_error("Could not send pending messages: %s" % e, e)
    message is sent to the chat room."""
    ardj.database.execute("INSERT INTO jabber_messages (re, message) VALUES (?, ?)", (recipient, message, ))
    ardj.database.commit()
 
 

src/a/r/ardj-1.2.1/src/ardj/console.py   ardj(Download)
        return u'Current filter: %s' % u' '.join(current)
    ardj.tracks.set_urgent(args)
    ardj.database.commit()
    return 'OK.'
 

src/a/r/ardj-1.2.1/src/ardj/users.py   ardj(Download)
        for alias in v:
            database.execute("UPDATE votes SET email = ? WHERE email = ?", (k, alias, ))
    database.commit()
 

src/a/r/ardj-1.2.1/src/ardj/podcast.py   ardj(Download)
            filename = ardj.util.fetch(mp3_link)
            ardj.add_file(str(filename), {'artist': artist, 'title': title, 'labels': tags, 'owner': 'podcaster'})
            ardj.database.commit()
            return True
        except Exception, e: