[Piglit] [PATCH 05/11] profile: Remove unnecessary if statement

Dylan Baker baker.dylan.c at gmail.com
Fri Apr 25 13:27:37 PDT 2014


This particular if doesn't present big performance wins, nor does it
affect the result of the code, but does make it harder to understand, so
just remove it.
---
 framework/profile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/profile.py b/framework/profile.py
index 82bf64d..b297aaa 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -76,7 +76,7 @@ class TestProfile(object):
 
         def f(prefix, group, test_dict):
             for key, value in group.iteritems():
-                fullkey = key if prefix == '' else os.path.join(prefix, key)
+                fullkey = os.path.join(prefix, key)
                 if isinstance(value, dict):
                     f(fullkey, value, test_dict)
                 else:
-- 
2.0.0.rc0



More information about the Piglit mailing list