python_dependency: move bottle check into method.