Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: blimp/tools/fake_web/server.py

Issue 2626423004: Remove all //blimp code. (Closed)
Patch Set: One last(?) `git merge` for good measure. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « blimp/tools/fake_web/data/square.html ('k') | blimp/tools/generate-target-manifest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/tools/fake_web/server.py
diff --git a/blimp/tools/fake_web/server.py b/blimp/tools/fake_web/server.py
deleted file mode 100755
index 34dd49b16c028eb8e1041a1c074f0ae62fa8b750..0000000000000000000000000000000000000000
--- a/blimp/tools/fake_web/server.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-
-# Copyright 2016 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import argparse
-import os
-import subprocess
-import sys
-import tempfile
-
-LIGHTTPD_CONF = """
-server.document-root = "{root}"
-server.port = {port}
-mimetype.assign = (
- ".html" => "text/html"
-)
-"""
-
-def run_lighttpd(conf):
- """Run lighttpd in a subprocess and block until it exits.
-
- Takes the lighttpd configuration file as a string.
- """
- with tempfile.NamedTemporaryFile() as conf_file:
- conf_file.write(conf)
- conf_file.file.close()
- server = subprocess.Popen(['lighttpd', '-D', '-f', conf_file.name])
- try:
- server.wait()
- except KeyboardInterrupt:
- # Let lighttpd handle the signal.
- server.wait()
-
-def main():
- script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
- data_dir = os.path.join(script_dir, 'data')
-
- parser = argparse.ArgumentParser()
- parser.add_argument('-p', '--port', default=3000)
- args = parser.parse_args()
-
- conf = LIGHTTPD_CONF.format(port=args.port, root=data_dir)
- print conf
- run_lighttpd(conf)
-
-if __name__ == '__main__':
- main()
« no previous file with comments | « blimp/tools/fake_web/data/square.html ('k') | blimp/tools/generate-target-manifest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698