Skip to content

Commit

Permalink
Fix bad regex escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 21, 2018
1 parent a7397b1 commit 3de7b38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/pyplugin_installer/installer_data.py
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion python/pyplugin_installer/version_compare.py
Expand Up @@ -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'
Expand Down

0 comments on commit 3de7b38

Please sign in to comment.