examples/tracing: Handle KeyboardInterrupt

Signed-off-by: Gary Lin <glin@suse.com>
diff --git a/examples/tracing/urandomread.py b/examples/tracing/urandomread.py
index c1468c8..69bcf8d 100755
--- a/examples/tracing/urandomread.py
+++ b/examples/tracing/urandomread.py
@@ -33,4 +33,6 @@
         (task, pid, cpu, flags, ts, msg) = b.trace_fields()
     except ValueError:
         continue
+    except KeyboardInterrupt:
+        exit()
     printb(b"%-18.9f %-16s %-6d %s" % (ts, task, pid, msg))