Fix some Python syntax errors that appear in v3.8.x

Fixes #11641
This commit is contained in:
prculley 2020-03-30 15:48:06 -05:00 committed by Paul Culley
parent 748fbd0949
commit f1f8847a86
4 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ class BasePluginManager:
def __init__(self):
""" This function should only be run once by get_instance() """
if BasePluginManager.__instance is not 1:
if BasePluginManager.__instance != 1:
raise Exception("This class is a singleton. "
"Use the get_instance() method")

View File

@ -1135,7 +1135,7 @@ class PluginRegister:
def __init__(self):
""" This function should only be run once by get_instance() """
if PluginRegister.__instance is not 1:
if PluginRegister.__instance != 1:
raise Exception("This class is a singleton. "
"Use the get_instance() method")
self.stable_only = True

View File

@ -71,7 +71,7 @@ class GuiPluginManager(Callback):
def __init__(self):
""" This function should only be run once by get_instance() """
if GuiPluginManager.__instance is not 1:
if GuiPluginManager.__instance != 1:
raise Exception("This class is a singleton. "
"Use the get_instance() method")

View File

@ -113,7 +113,7 @@ class MessageLayer(GObject.GObject, osmgpsmap.MapLayer):
"""
Add a message
"""
self.message += "\n%s" % message if self.message is not "" else message
self.message += "\n%s" % message if self.message else message
def do_draw(self, gpsmap, ctx):
"""