Fix crashes with higher verbosity levels
Fix crashes with higher verbosity levels

This was causing issues in running the test suite locally at higher
verbosity levels, since this block causes errors when passed a URL.

pradyunsg/pip,sbidoul/pip,pypa/pip,pypa/pip,pradyunsg/pip,pfmoore/pip,pfmoore/pip,sbidoul/pip