Skip to content
Permalink
Browse files

Fix bad regex escaping

  • Loading branch information
nyalldawson committed May 21, 2018
1 parent a7397b1 commit 3de7b383b0cb2fb849b7fc48e08961f77c388c5a
Showing with 2 additions and 2 deletions.
  1. +1 −1 python/pyplugin_installer/installer_data.py
  2. +1 −1 python/pyplugin_installer/version_compare.py
@@ -214,7 +214,7 @@ def allUnavailable(self):
def urlParams(self):
""" return GET parameters to be added to every request """
# Strip down the point release segment from the version string
return "?qgis=%s" % re.sub('\.\d*$', '', pyQgisVersion())
return "?qgis={}".format(re.sub(r'\.\d*$', '', pyQgisVersion()))

# ----------------------------------------- #
def setRepositoryData(self, reposName, key, value):
@@ -207,7 +207,7 @@ def pyQgisVersion():
If Y = 99, bump up to (X+1.0.0), so e.g. 2.99 becomes 3.0.0
This way QGIS X.99 is only compatible with plugins for the upcoming major release.
"""
x, y, z = re.findall('^(\d*).(\d*).(\d*)', Qgis.QGIS_VERSION)[0]
x, y, z = re.findall(r'^(\d*).(\d*).(\d*)', Qgis.QGIS_VERSION)[0]
if y == '99':
x = str(int(x) + 1)
y = z = '0'

0 comments on commit 3de7b38

Please sign in to comment.
You can’t perform that action at this time.