mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Fix bad regex escaping
This commit is contained in:
parent
a7397b1726
commit
3de7b383b0
@ -214,7 +214,7 @@ class Repositories(QObject):
|
||||
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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user