From e711c1ad5a6c8d249cf1a5d27d4ca35c79fabefc Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 17 Oct 2011 19:09:51 +0200 Subject: [PATCH] Squish: Use isinstance() instead of comparing classnames Change-Id: Ia0683902e96f1dc175978bdbb13fbd114f6ad739 Reviewed-by: Christian Stenger --- tests/system/shared/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/system/shared/utils.py b/tests/system/shared/utils.py index 6f7e59ef485..98e1b05387e 100644 --- a/tests/system/shared/utils.py +++ b/tests/system/shared/utils.py @@ -103,9 +103,9 @@ def prepareForSignal(object, signal): def cleanUpUserFiles(pathsToProFiles=None): if pathsToProFiles==None: return False - if className(pathsToProFiles) in ("str", "unicode"): + if isinstance(pathsToProFiles, (str, unicode)): filelist = glob.glob(pathsToProFiles+".user*") - elif className(pathsToProFiles)=="list": + elif isinstance(pathsToProFiles, (list, tuple)): filelist = [] for p in pathsToProFiles: filelist.extend(glob.glob(p+".user*"))