From 88306f300624b472924819bdcab12712683fd357 Mon Sep 17 00:00:00 2001
From: Gabriel Studer <gabriel.studer@stud.unibas.ch>
Date: Fri, 26 Apr 2013 11:52:40 +0200
Subject: [PATCH] explicitely import a certain class instead of importing the
 whole file

---
 modules/base/pymod/table.py      | 10 ++++------
 modules/base/tests/test_table.py |  2 +-
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/modules/base/pymod/table.py b/modules/base/pymod/table.py
index 207c5ab29..8198b4041 100644
--- a/modules/base/pymod/table.py
+++ b/modules/base/pymod/table.py
@@ -850,17 +850,15 @@ Statistics for column %(col)s
       #selects rows, where col_a=1 or col_a=2 or col_a=3
       subtab=tab.Select('col_a=1,2,3')
 
-    Only consistent types can be compared. If col_a is of type string and ccol_b is of type int, 
-    following expression would throw an error: 'col_a<ccol_b'
+    Only consistent types can be compared. If col_a is of type string and col_b is of type int, 
+    following expression would throw an error: 'col_a<col_b'
 
     """
 
-    import traceback
     try:
-      from table_selector import *
+      from table_selector import TableSelector
     except:
-      traceback.print_exc()
-      raise ImportError("Tried to import the file table_selector.py, but could not find it!")
+      raise ImportError("Tried to import from the file table_selector.py, but could not find it!")
 
     selector=TableSelector(self.col_types, self.col_names, query)
 
diff --git a/modules/base/tests/test_table.py b/modules/base/tests/test_table.py
index f4d22c5f0..731acc185 100644
--- a/modules/base/tests/test_table.py
+++ b/modules/base/tests/test_table.py
@@ -1703,7 +1703,7 @@ class TestTable(unittest.TestCase):
     self.assertRaises(ValueError,tab.Select,'c>d')
     self.assertRaises(ValueError,tab.Select,'c+d=5')
 
-    from ost.table_selector import *
+    from ost.table_selector import TableSelector
 
     selector=TableSelector(tab.col_types,tab.col_names,'')
 
-- 
GitLab