Warning when using pypi element without a mirror

Using only a local filesystem mirror could lead opaque errors.
Print a warning message in this situations.

Change-Id: I5f77151ea928868f4c441e8a1bb2eb0966b21832
Closes-Bug: #1297948
This commit is contained in:
Ghe Rivero 2014-11-18 15:50:39 +01:00
parent 47b58526e7
commit 91977e7c8f

View File

@ -12,6 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
from __future__ import print_function
import os.path
@ -24,6 +26,8 @@ def main():
indices = list(map(os.environ.get, sorted(candidates)))
else:
indices = ['file:///tmp/pypi']
print('WARNING: You are using the pypi element but no pypi mirror is '
'defined via the PYPI_MIRROR_URL env variable')
easy_index = indices[-1]
use_pypi_python_org = True
if os.environ.get('DIB_OFFLINE'):