small fixes of code style
authorWall <wall@gmail.com>
Thu, 26 Feb 2009 21:05:48 +0000 (21:05 +0000)
committerWall <wall@gmail.com>
Thu, 26 Feb 2009 21:05:48 +0000 (21:05 +0000)
src/findit.py

index 79b52ec..705ca67 100755 (executable)
@@ -10,7 +10,6 @@ from os.path import join, abspath, normcase, basename, \
                     isdir, getsize, getatime, getmtime
 from heapq import nlargest
 import gettext
-import sys
 import time
 
 try: import hildon; hildonFound = True
@@ -24,7 +23,8 @@ try:
     langRU.install()
 except:
     # Закомментировать перед использованием pygettext
-    def _(text): return text
+    def _(text): 
+        return text
 
 
 ### Common functions ###########################################################
@@ -60,16 +60,19 @@ def filegetter(startpath, obj):
                 obj.stopit = False
                 raise StopIteration
             # Проверяем можем ли мы определить размер файла - иначе пропускаем его
-            try:    flsize = getsize(flpath)
-            except: continue
+            try:
+                flsize = getsize(flpath)
+            except:
+                continue
             # Возвращаем размер и полный путь файла
             yield flsize, flpath
 
 # Fullscreen
 def toggle_fullscreen(obj):
     if obj.fullscreen:
-          obj.window.unfullscreen()
-    else: obj.window.fullscreen()
+        obj.window.unfullscreen()
+    else: 
+        obj.window.fullscreen()
     obj.fullscreen = not obj.fullscreen
 
 # Нажатие на кнопку клавиатуры
@@ -165,8 +168,10 @@ class MainWindow(gtk.Window):
 
                 # Выдает какую-то перманентную ошибку при присвоении значений treestore -
                 # кто увидит скажите - нужна статистика
-                try: self.treestore.append(None, [fpath, size_convert(fsize), fsize])
-                except: 'error', fpath, size_convert(fsize), fsize
+                try: 
+                    self.treestore.append(None, [fpath, size_convert(fsize), fsize])
+                except: 
+                    'error', fpath, size_convert(fsize), fsize
             self.butt_start.set_sensitive(True)
             self.butt_stop.set_sensitive(False)
             self.propertiesBtn.set_sensitive(True)
@@ -316,7 +321,6 @@ class MainWindow(gtk.Window):
     def run(self):
         self.show_all()
         gtk.main()
-        return 0
 
 
 ### Main call ##################################################################
@@ -325,3 +329,4 @@ if __name__ == '__main__':
     gobject.set_application_name( _('FindIT') )
     app = MainWindow(575, 345, '.')
     app.run()
+