Improve qute:foo error message

This commit is contained in:
Florian Bruhin 2014-06-21 23:10:47 +02:00
parent e0bb09cbce
commit fa9dd97f13

View File

@ -90,9 +90,11 @@ class QuteSchemeHandler(SchemeHandler):
try: try:
handler = getattr(QuteHandlers, path) handler = getattr(QuteHandlers, path)
except AttributeError: except AttributeError:
return ErrorNetworkReply( errorstr = "No handler found for {}!".format(
request, "No handler found for {}!".format(path), request.url().toDisplayString())
QNetworkReply.ContentNotFoundError, self.parent()) return ErrorNetworkReply(request, errorstr,
QNetworkReply.ContentNotFoundError,
self.parent())
else: else:
data = handler() data = handler()
return SpecialNetworkReply(request, data, 'text/html', self.parent()) return SpecialNetworkReply(request, data, 'text/html', self.parent())