[FIX] qweb: display a warning when try to use profiling without astor module

This commit is contained in:
Christophe Matthieu
2016-08-29 10:33:22 +02:00
parent 4fd99a9aae
commit 00f18312bd
+3
View File
@@ -372,6 +372,9 @@ class QWeb(object):
def _profiling(self, astmod, options):
""" Add profiling code into the givne module AST. """
if not astor:
_logger.warning("Please install astor to display the code profiling")
return
code_line = astor.to_source(astmod)
# code = $code_lines.split(u"\n")