Update amprupdate.py

adapting patch to existing code.