fixing some bugs in src/file.py
authorAlexandr Popov <popov2al@gmail.com>
Mon, 9 Mar 2009 16:10:07 +0000 (19:10 +0300)
committerAlexandr Popov <popov2al@gmail.com>
Mon, 9 Mar 2009 16:10:07 +0000 (19:10 +0300)
src/file.py

index cabaad8..94a7746 100644 (file)
@@ -4,13 +4,16 @@
 # pylint: disable-msg=C0301
 
 class File(object):
+    def add(self, fpath, fsize):
+        self.fl_path = fpath
+        self.fl_size = fsize
     
     def show(self):
         self.cur_ui.show(self.fl_path, self.fl_size)
         
-    def __init__(self, ui, fpath, fsize):
+    def __init__(self, ui):
         if ui is 'console':
             from consprint import ConsPrint
             self.cur_ui = ConsPrint()
-        self.fl_path = fpath
-        self.fl_size = fsize
+        self.fl_path = None
+        self.fl_size = None