From d55775edd7470c6dc77eea792b6e08d2b42b4e5d Mon Sep 17 00:00:00 2001 From: Stanislav Bolshakov Date: Fri, 26 Jun 2020 13:57:19 +0300 Subject: [PATCH] Pluginmanager: fix Pytho3 syntaksis 1. Run python3 -m unittest discover -p 'date*test.py' from https://gramps-project.org/wiki/index.php/Date_Handler#Calendars 2. See errors, 3. Fix this errors. --- gramps/gen/plug/_manager.py | 2 +- gramps/gen/plug/_pluginreg.py | 2 +- gramps/gui/pluginmanager.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gramps/gen/plug/_manager.py b/gramps/gen/plug/_manager.py index 8fc4348f7..51bd85a2c 100644 --- a/gramps/gen/plug/_manager.py +++ b/gramps/gen/plug/_manager.py @@ -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") diff --git a/gramps/gen/plug/_pluginreg.py b/gramps/gen/plug/_pluginreg.py index b2e710fec..10c08db4d 100644 --- a/gramps/gen/plug/_pluginreg.py +++ b/gramps/gen/plug/_pluginreg.py @@ -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 diff --git a/gramps/gui/pluginmanager.py b/gramps/gui/pluginmanager.py index df5748001..f2525304d 100644 --- a/gramps/gui/pluginmanager.py +++ b/gramps/gui/pluginmanager.py @@ -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")