Skip to content

Commit

Permalink
from PyQGIS 2 to PyQGIS3 - Using Qgis::MessageLevel
Browse files Browse the repository at this point in the history
close #198

No more Python errors when saving, deleting or renaming quick searches
  • Loading branch information
SimonSAMPERE committed Jun 25, 2019
1 parent 391a373 commit 3aab73f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions isogeo.py
Expand Up @@ -436,7 +436,7 @@ def api_auth_handle_token(self, answer):
msgBar.pushMessage(self.tr("Request to Isogeo failed: please "
"check your Internet connection."),
duration=10,
level=msgBar.WARNING)
level=1)
logger.error("Internet connection failed")
self.pluginIsActive = False
else:
Expand Down Expand Up @@ -473,7 +473,7 @@ def api_auth_handle_token(self, answer):
"Isogeo API answered: {}")
.format(parsed_content.get('error')),
duration=10,
level=msgBar.WARNING)
level=1)
plg_api_mngr.req_status_isClear = True
else:
logger.debug("The API reply has an unexpected form: {}"
Expand All @@ -483,7 +483,7 @@ def api_auth_handle_token(self, answer):
"Isogeo API answered: {}")
.format(parsed_content.get('error')),
duration=10,
level=msgBar.CRITICAL)
level=2)
plg_api_mngr.req_status_isClear = True

# -- API - REQUEST --------------------------------------------------------
Expand Down Expand Up @@ -1344,7 +1344,7 @@ def quicksearch_rename(self):
msgBar.pushMessage("Isogeo",
self.tr("Quicksearch renamed: from {} to {}")
.format(old_name, new_name),
level=msgBar.INFO,
level=0,
duration=3)
# method ending
return
Expand Down Expand Up @@ -1372,7 +1372,7 @@ def quicksearch_remove(self):
msgBar.pushMessage("Isogeo",
self.tr("Quicksearch removed: {}")
.format(to_be_deleted),
level=msgBar.INFO,
level=0,
duration=3)
# method ending
return
Expand Down

0 comments on commit 3aab73f

Please sign in to comment.