From 509a1d3cc4d17664fc23b625e394155488255b9d Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Sun, 7 May 2017 18:57:22 +0200 Subject: [PATCH] PyDumper: Don't crash if hasSurface is missing. Not all types on which we use associatedSurface have a corresponding hasSurface method. Don't crash if it's missing. Former-commit-id: b7c370a7d45884734ac28af8a8f6571c3a10f054 --- Event/PyDumper/python/Dumpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Event/PyDumper/python/Dumpers.py b/Event/PyDumper/python/Dumpers.py index 1b5be9bf8d2..a1225b2b639 100644 --- a/Event/PyDumper/python/Dumpers.py +++ b/Event/PyDumper/python/Dumpers.py @@ -1460,7 +1460,7 @@ def dump_surface (p, f): def dump_associatedSurface (p, f): - if not p.hasSurface(): + if hasattr(p, 'hasSurface') and not p.hasSurface(): print >> f, None, else: dump_surface (p.associatedSurface(), f) -- GitLab