Index: cms/bin/test_server.py |
=================================================================== |
--- a/cms/bin/test_server.py |
+++ b/cms/bin/test_server.py |
@@ -11,22 +11,21 @@ |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
# GNU General Public License for more details. |
# |
# You should have received a copy of the GNU General Public License |
# along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
import sys, os, flask |
-from ...utils import setupStderr |
from ..utils import process_page |
from ..sources import FileSource |
from ..converters import converters |
-app = flask.Flask("sitescripts.cms.bin.test_server") |
+app = flask.Flask("cms.bin.test_server") |
source = None |
mime_types = { |
"": "text/html; charset=utf-8", |
".htm": "text/html; charset=utf-8", |
".html": "text/html; charset=utf-8", |
".js": "application/javascript; charset=utf-8", |
".css": "text/css; charset=utf-8", |
@@ -62,19 +61,18 @@ def show(path=""): |
if data == None: |
flask.abort(404) |
root, ext = os.path.splitext(path) |
mime = mime_types.get(ext.lower(), "application/octet-stream") |
return data, 200, {"Content-Type": mime} |
if __name__ == "__main__": |
- setupStderr() |
if len(sys.argv) < 2: |
print >>sys.stderr, "Usage: %s source_dir" % sys.argv[0] |
sys.exit(1) |
source = FileSource(sys.argv[1]) |
# Make sure to "fix" argv to ensure that restart can succeed |
- sys.argv[0:1] = ["-m", "sitescripts.cms.bin.test_server"] |
+ sys.argv[0:1] = ["-m", "cms.bin.test_server"] |
app.run(debug=True) |