In Debian, we replace the embedded copy of tornado with a Recommends on
the python-tornado package. Print a nice error message instead of a
backtrace if the user doesn't have it installed.
Signed-off-by: Robert S. Edmonds <edmonds@debian.org>
[rlb@defaultvalue.org: edited commit and error message]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
#!/usr/bin/env python
import sys, stat, urllib, mimetypes, posixpath, time
-import tornado.httpserver
-import tornado.ioloop
-import tornado.web
from bup import options, git, vfs
from bup.helpers import *
+try:
+ import tornado.httpserver
+ import tornado.ioloop
+ import tornado.web
+except ImportError:
+ log('error: cannot find the python "tornado" module; please install it\n')
+ sys.exit(1)
handle_ctrl_c()