[Erp5-report] r11606 - /erp5/trunk/utils/erp5mechanize/runBenchmarks.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Dec 5 11:01:20 CET 2006


Author: aurel
Date: Tue Dec  5 11:01:16 2006
New Revision: 11606

URL: http://svn.erp5.org?rev=11606&view=rev
Log:
remove .py if exists in config file

Modified:
    erp5/trunk/utils/erp5mechanize/runBenchmarks.py

Modified: erp5/trunk/utils/erp5mechanize/runBenchmarks.py
URL: http://svn.erp5.org/erp5/trunk/utils/erp5mechanize/runBenchmarks.py?rev=11606&r1=11605&r2=11606&view=diff
==============================================================================
--- erp5/trunk/utils/erp5mechanize/runBenchmarks.py (original)
+++ erp5/trunk/utils/erp5mechanize/runBenchmarks.py Tue Dec  5 11:01:16 2006
@@ -332,8 +332,10 @@
                                           # imports from inside the tests
                                           # suite will also have a correct
                                           # path.
-    file, path, description = imp.find_module(kw['config'], sys.path)
-    module = imp.load_module(kw['config'], file, path, description)
+    # remove .py it exsts
+    root, ext = os.path.splitext(kw['config'])      
+    file, path, description = imp.find_module(root, sys.path)
+    module = imp.load_module(root, file, path, description)
     file.close()
     del kw['config'] # It should not be passed to main
     if 'runBenchmarks_parameter_list' in dir(module):




More information about the Erp5-report mailing list