fix apt.py refresh_db (issue #3488)