From 02935e7796b6fa185feb439315bcf7bb31015af9 Mon Sep 17 00:00:00 2001 From: Fabrice Desclaux Date: Thu, 17 Mar 2016 08:56:30 +0100 Subject: Example/dg: fix print solutions --- example/symbol_exec/depgraph.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/symbol_exec/depgraph.py b/example/symbol_exec/depgraph.py index c0eeb134..d30b1ef0 100644 --- a/example/symbol_exec/depgraph.py +++ b/example/symbol_exec/depgraph.py @@ -91,6 +91,9 @@ for sol_nb, sol in enumerate(dg.get(current_block.label, elements, line_nb, set( if sat: constraints = {} for element in sol.constraints: - constraints[element] = hex( - sol.constraints[element].as_long()) + try: + result = hex(sol.constraints[element].as_long()) + except AttributeError: + result = str(sol.constraints[element]) + constraints[element] = result print "\tSatisfiability: %s %s" % (sat, constraints) -- cgit 1.4.1