Exemple #1
0
def get_dropbox_shared_folders():
    local_ns = get_dropbox_root_ns()
    local_path = get_dropbox_path()
    con = sqlite3.connect(platform.get_dropbox_dbfile("filecache.db"))
    con.row_factory = sqlite3.Row
    return [(unicode(row["target_ns"]),
             os.path.normpath(row["server_path"].replace("%s:" % local_ns, local_path).lower()))
            for row in con.execute("SELECT * FROM mount_table")]
Exemple #2
0
def get_dropbox_config(key):
    con = sqlite3.connect(platform.get_dropbox_dbfile("config.db"))
    return con.execute("SELECT * FROM config WHERE config.key=?", (key,)).fetchone()[1]