diff options
| author | jvoisin | 2012-12-20 20:47:23 +0100 |
|---|---|---|
| committer | jvoisin | 2012-12-20 20:47:23 +0100 |
| commit | f40f22f1fb2ce1e85117be4e75cdb3142331b25e (patch) | |
| tree | 2b95b4874ddf13a8c811f85ec446c1cfacf80d59 | |
| parent | 5f16b7eed798dff0d36c06bc8c2352dd621fc34b (diff) | |
Improve pylint's score
| -rwxr-xr-x | mat-gui | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -9,7 +9,7 @@ import gtk | |||
| 9 | import gobject | 9 | import gobject |
| 10 | 10 | ||
| 11 | import gettext | 11 | import gettext |
| 12 | import locale | 12 | #import locale |
| 13 | import logging | 13 | import logging |
| 14 | import os | 14 | import os |
| 15 | import sys | 15 | import sys |
| @@ -257,7 +257,7 @@ class GUI: | |||
| 257 | 257 | ||
| 258 | response = chooser.run() | 258 | response = chooser.run() |
| 259 | 259 | ||
| 260 | if response is 0: # gtk.STOCK_OK | 260 | if not response: # gtk.STOCK_OK |
| 261 | filenames = chooser.get_filenames() | 261 | filenames = chooser.get_filenames() |
| 262 | task = self.populate(filenames) | 262 | task = self.populate(filenames) |
| 263 | gobject.idle_add(task.next) # asynchrone processing | 263 | gobject.idle_add(task.next) # asynchrone processing |
| @@ -296,8 +296,7 @@ class GUI: | |||
| 296 | self.liststore.append([cf, os.path.dirname(cf.file.filename) + os.path.sep, | 296 | self.liststore.append([cf, os.path.dirname(cf.file.filename) + os.path.sep, |
| 297 | cf.file.basename, cf.file.mime, _('unknow'), 'None']) | 297 | cf.file.basename, cf.file.mime, _('unknow'), 'None']) |
| 298 | return False | 298 | return False |
| 299 | else: | 299 | return True |
| 300 | return True | ||
| 301 | 300 | ||
| 302 | def __popup_metadata(self, widget, row, col): | 301 | def __popup_metadata(self, widget, row, col): |
| 303 | ''' | 302 | ''' |
| @@ -368,7 +367,7 @@ class GUI: | |||
| 368 | 367 | ||
| 369 | dialog.show_all() | 368 | dialog.show_all() |
| 370 | click = dialog.run() | 369 | click = dialog.run() |
| 371 | if click is 0: # Ok button | 370 | if not click: # Ok button |
| 372 | dialog.destroy() | 371 | dialog.destroy() |
| 373 | 372 | ||
| 374 | def __about(self, button): | 373 | def __about(self, button): |
| @@ -438,7 +437,7 @@ class GUI: | |||
| 438 | 437 | ||
| 439 | dialog.show_all() | 438 | dialog.show_all() |
| 440 | click = dialog.run() | 439 | click = dialog.run() |
| 441 | if click is 0: # Close | 440 | if not click: # Close |
| 442 | dialog.destroy() | 441 | dialog.destroy() |
| 443 | 442 | ||
| 444 | def __preferences(self, button): | 443 | def __preferences(self, button): |
| @@ -486,7 +485,7 @@ non-anonymised) file to output archive')) | |||
| 486 | 485 | ||
| 487 | hbox.show_all() | 486 | hbox.show_all() |
| 488 | response = dialog.run() | 487 | response = dialog.run() |
| 489 | if response == 0: # gtk.STOCK_OK | 488 | if not response: # gtk.STOCK_OK |
| 490 | for i in self.liststore: # update preferences | 489 | for i in self.liststore: # update preferences |
| 491 | i[0].backup = self.backup | 490 | i[0].backup = self.backup |
| 492 | i[0].add2archive = self.add2archive | 491 | i[0].add2archive = self.add2archive |
| @@ -581,6 +580,7 @@ non-anonymised) file to output archive')) | |||
| 581 | 580 | ||
| 582 | if __name__ == '__main__': | 581 | if __name__ == '__main__': |
| 583 | gettext.install('MAT', unicode=True) | 582 | gettext.install('MAT', unicode=True) |
| 583 | _ = gettext.gettext | ||
| 584 | 584 | ||
| 585 | #Main | 585 | #Main |
| 586 | gui = GUI() | 586 | gui = GUI() |
