Skip to content

Commit

Permalink
Processing: Avoid deprecated regex
Browse files Browse the repository at this point in the history
Escape sequence avoided in DefinProjection by using raw string:

`re.compile('\|.*')` > `re.compile(r'\|.*')`
  • Loading branch information
tomchadwin authored and nyalldawson committed Jun 5, 2018
1 parent 0e72384 commit 6a8a622
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/algs/qgis/DefineProjection.py
Expand Up @@ -75,7 +75,7 @@ def processAlgorithm(self, parameters, context, feedback):

provider = layer.dataProvider()
ds = provider.dataSourceUri()
p = re.compile('\|.*')
p = re.compile(r'\|.*')
dsPath = p.sub('', ds)

if dsPath.lower().endswith('.shp'):
Expand Down

0 comments on commit 6a8a622

Please sign in to comment.