Skip to content

Commit

Permalink
Processing: avoid deprecated regex
Browse files Browse the repository at this point in the history
Invalid escape sequence avoided via raw string:

`re.findall("\d+|[a-zA-Z]+", rep[0][0])` > `re.findall(r"\d+|[a-zA-Z]+", rep[0][0])`
  • Loading branch information
tomchadwin authored and nyalldawson committed Jun 5, 2018
1 parent 6a8a622 commit fab563f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/processing/tools/spatialite.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def init_spatialite(self):
try: try:
self._exec_sql(c, u'SELECT spatialite_version()') self._exec_sql(c, u'SELECT spatialite_version()')
rep = c.fetchall() rep = c.fetchall()
v = [int(x) if x.isdigit() else x for x in re.findall("\d+|[a-zA-Z]+", rep[0][0])] v = [int(x) if x.isdigit() else x for x in re.findall(r"\d+|[a-zA-Z]+", rep[0][0])]


# Add SpatiaLite support # Add SpatiaLite support
if v >= [4, 1, 0]: if v >= [4, 1, 0]:
Expand Down

0 comments on commit fab563f

Please sign in to comment.