[accerciser/gnome-3-32] Use more pythonesque value



commit e09cc40207a7e977ad72e127563b9d182d2c731e
Author: Samuel Thibault <samuel thibault ens-lyon org>
Date:   Mon Jun 10 18:11:32 2019 +0200

    Use more pythonesque value
    
    (cherry picked from commit cabf3639d16495cc66368b46ec8d236138218a28)

 plugins/validate.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/validate.py b/plugins/validate.py
index f347faa..8d797fc 100644
--- a/plugins/validate.py
+++ b/plugins/validate.py
@@ -197,7 +197,7 @@ class ValidatorViewport(ViewportPlugin):
     self.clear = self.main_xml.get_object('clear button')
     self.schema = self.main_xml.get_object('schema combo')
     self.validator_buffer = gtk.TextBuffer()
-    self.idle_validate_id = 0
+    self.idle_validate_id = None
 
     # model for the combobox
     model = gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING)
@@ -422,7 +422,7 @@ class ValidatorViewport(ViewportPlugin):
     Stops a validation run by disabling the idle callback and restoring the
     various UI components to their enabled states.
     '''
-    if self.idle_validate_id == 0:
+    if self.idle_validate_id == None:
       return
     # stop callbacks
     GLib.source_remove(self.idle_validate_id)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]