fixing get_ui in input.py
authorAlexandr Popov <popov2al@gmail.com>
Tue, 10 Mar 2009 18:11:23 +0000 (21:11 +0300)
committerAlexandr Popov <popov2al@gmail.com>
Tue, 10 Mar 2009 18:11:23 +0000 (21:11 +0300)
src/input.py

index 03c9734..51d612d 100644 (file)
@@ -4,12 +4,10 @@
 # pylint: disable-msg=C0301
 
 class Input(object):
+    def __init__(self, parser):
+        self.ui = parser
+        self.get_st_par()
+    
     def get_st_par(self):
         self.st_dir, self.st_cnt = self.ui.get()
-        return self.st_dir, self.st_cnt
-        
-    def __init__(self, cur_ui):
-        if cur_ui is 'console':
-            from optparser import OptParser
-            self.ui = OptParser()
-            self.get_st_par()
+        return self.st_dir, self.st_cnt