From 00203980f2cc63cc96bafd0bc0c5f59241bd6ccb Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Fri, 23 Nov 2018 00:20:25 -0500 Subject: [PATCH] More robust static serving Signed-off-by: Dan Ryan --- tests/pytest-pypi/pytest_pypi/app.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/pytest-pypi/pytest_pypi/app.py b/tests/pytest-pypi/pytest_pypi/app.py index a9c6064f..4e013ab5 100644 --- a/tests/pytest-pypi/pytest_pypi/app.py +++ b/tests/pytest-pypi/pytest_pypi/app.py @@ -4,6 +4,8 @@ import sys import requests from flask import Flask, redirect, abort, render_template, send_file, jsonify +from zipfile import is_zipfile +from tarfile import is_tarfile app = Flask(__name__) session = requests.Session() @@ -51,7 +53,7 @@ class Artifact(object): def __repr__(self): return "