def migrate_ptc_db(old_db_dir, new_db_dir):
    old_db_path = os.path.join(old_db_dir, "ptcwallet.db")
    if not os.path.exists(old_db_path):
        return True
    old_db = leveldb.LevelDB(old_db_path)
    try:
        p_key = old_db.Get("private_key")
        new_db = unqlite.UnQLite(os.path.join(new_db_dir, "ptcwallet.db"))
        new_db['private_key'] = p_key
    except __HOLE__:
        pass
dataset/ETHPy150Open lbryio/lbry/lbrynet/db_migrator/migrate0to1.py/migrate_ptc_db