[pypy-commit] jitviewer default: some cleanups
fijal
noreply at buildbot.pypy.org
Fri Jul 8 13:45:40 CEST 2011
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch:
Changeset: r137:5af601922365
Date: 2011-07-08 13:54 +0200
http://bitbucket.org/pypy/jitviewer/changeset/5af601922365/
Log: some cleanups
diff --git a/bin/jitviewer.py b/bin/jitviewer.py
--- a/bin/jitviewer.py
+++ b/bin/jitviewer.py
@@ -37,7 +37,6 @@
raise ImportError('Could not import pypy module, make sure to '
'add the pypy module to PYTHONPATH')
-import cgi
import flask
import inspect
import threading
@@ -50,15 +49,6 @@
from _jitviewer.display import CodeRepr, CodeReprNoFile
import _jitviewer
-from pygments import highlight
-from pygments.lexers import PythonLexer
-from pygments.formatters import HtmlFormatter
-
-from jinja2 import Environment, FileSystemLoader
-
-from werkzeug import Response
-from flask.helpers import send_from_directory
-
CUTOFF = 30
class CannotFindFile(Exception):
@@ -223,7 +213,7 @@
#
# start the webkit browser in the main thread (actually, it's a subprocess)
time.sleep(0.5) # give the server some time to start
- ret = start_browser(url, filename)
+ start_browser(url, filename)
finally:
# shutdown the HTPP server and wait until it completes
app.servers[0].shutdown()
@@ -238,7 +228,10 @@
except Exception, e:
print 'Cannot start the builtin browser: %s' % e
print "Please point your browser to: %s" % url
- raw_input("Press enter to quit and kill the server")
+ try:
+ raw_input("Press enter to quit and kill the server")
+ except KeyboardInterrupt:
+ pass
if __name__ == '__main__':
main()
More information about the pypy-commit
mailing list