[geany/geany-plugins] ea794c: Don't mix NoneType/strings with integer comparison

Enrico Tröger git-noreply at xxxxx
Sat Oct 4 09:52:09 UTC 2014


Branch:      refs/heads/master
Author:      Enrico Tröger <enrico.troeger at uvena.de>
Committer:   Enrico Tröger <enrico.troeger at uvena.de>
Date:        Sat, 04 Oct 2014 09:52:09 UTC
Commit:      ea794c0dfa91387eb214459d37530351f75e7de2
             https://github.com/geany/geany-plugins/commit/ea794c0dfa91387eb214459d37530351f75e7de2

Log Message:
-----------
Don't mix NoneType/strings with integer comparison

This works in Python2 but breaks in Python3.


Modified Paths:
--------------
    wscript

Modified: wscript
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -115,7 +115,7 @@ def configure(conf):
     conf.write_config_header('config.h')
 
     # enable debug when compiling from VCS
-    if revision > 0:
+    if revision is not None:
         conf.env.append_value('CFLAGS', '-g -DDEBUG'.split())  # -DGEANY_DISABLE_DEPRECATED
 
     # summary
@@ -123,7 +123,7 @@ def configure(conf):
     conf.msg('Install Geany Plugins ' + VERSION + ' in', conf.env['G_PREFIX'])
     conf.msg('Using GTK version', gtk_version)
     conf.msg('Using Geany version', geany_version)
-    if revision > 0:
+    if revision is not None:
         conf.msg('Compiling Git revision', revision)
     conf.msg('Plugins to compile', ' '.join(enabled_plugins))
 



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list