From 57b9eddfb04eab2e4805847b04d9adeed577b6d9 Mon Sep 17 00:00:00 2001 From: Bernd Hahnebach Date: Thu, 6 Dec 2018 10:16:28 +0100 Subject: [PATCH] FEM: utils, improve method to return the obj type --- src/Mod/Fem/femtools/femutils.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Mod/Fem/femtools/femutils.py b/src/Mod/Fem/femtools/femutils.py index 6ce496594e..1d3070d234 100644 --- a/src/Mod/Fem/femtools/femutils.py +++ b/src/Mod/Fem/femtools/femutils.py @@ -98,11 +98,8 @@ def type_of_obj(obj): def is_of_type(obj, ty): - '''returns if an object is of a given TypeId (C++ objects) or Proxy.Type (Python objects)''' - if type_of_obj(obj) == ty: - return True - else: - return False + '''returns True if an object is of a given TypeId (C++ objects) or Proxy.Type (Python Features)''' + return type_of_obj(obj) == ty def getBoundBoxOfAllDocumentShapes(doc):