Skip to content

Commit 3de7b38

Browse files
committedMay 21, 2018
Fix bad regex escaping
1 parent a7397b1 commit 3de7b38

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎python/pyplugin_installer/installer_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def allUnavailable(self):
214214
def urlParams(self):
215215
""" return GET parameters to be added to every request """
216216
# Strip down the point release segment from the version string
217-
return "?qgis=%s" % re.sub('\.\d*$', '', pyQgisVersion())
217+
return "?qgis={}".format(re.sub(r'\.\d*$', '', pyQgisVersion()))
218218

219219
# ----------------------------------------- #
220220
def setRepositoryData(self, reposName, key, value):

‎python/pyplugin_installer/version_compare.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def pyQgisVersion():
207207
If Y = 99, bump up to (X+1.0.0), so e.g. 2.99 becomes 3.0.0
208208
This way QGIS X.99 is only compatible with plugins for the upcoming major release.
209209
"""
210-
x, y, z = re.findall('^(\d*).(\d*).(\d*)', Qgis.QGIS_VERSION)[0]
210+
x, y, z = re.findall(r'^(\d*).(\d*).(\d*)', Qgis.QGIS_VERSION)[0]
211211
if y == '99':
212212
x = str(int(x) + 1)
213213
y = z = '0'

0 commit comments

Comments
 (0)
Please sign in to comment.