OLD | NEW |
1 # coding: utf-8 | 1 # coding: utf-8 |
2 | 2 |
3 # This file is part of the Adblock Plus web scripts, | 3 # This file is part of the Adblock Plus web scripts, |
4 # Copyright (C) 2006-2015 Eyeo GmbH | 4 # Copyright (C) 2006-2015 Eyeo GmbH |
5 # | 5 # |
6 # Adblock Plus is free software: you can redistribute it and/or modify | 6 # Adblock Plus is free software: you can redistribute it and/or modify |
7 # it under the terms of the GNU General Public License version 3 as | 7 # it under the terms of the GNU General Public License version 3 as |
8 # published by the Free Software Foundation. | 8 # published by the Free Software Foundation. |
9 # | 9 # |
10 # Adblock Plus is distributed in the hope that it will be useful, | 10 # Adblock Plus is distributed in the hope that it will be useful, |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 mime = mime_types.get(ext.lower(), "application/octet-stream") | 65 mime = mime_types.get(ext.lower(), "application/octet-stream") |
66 return data, 200, {"Content-Type": mime} | 66 return data, 200, {"Content-Type": mime} |
67 | 67 |
68 if __name__ == "__main__": | 68 if __name__ == "__main__": |
69 if len(sys.argv) < 2: | 69 if len(sys.argv) < 2: |
70 print >>sys.stderr, "Usage: %s source_dir" % sys.argv[0] | 70 print >>sys.stderr, "Usage: %s source_dir" % sys.argv[0] |
71 sys.exit(1) | 71 sys.exit(1) |
72 | 72 |
73 source = FileSource(sys.argv[1]) | 73 source = FileSource(sys.argv[1]) |
74 | 74 |
75 # Make sure to "fix" argv to ensure that restart can succeed | |
76 sys.argv[0:1] = ["-m", "cms.bin.test_server"] | |
77 | |
78 app.run(debug=True) | 75 app.run(debug=True) |
OLD | NEW |