[console] Fix invalid regex warning

This commit is contained in:
Nyall Dawson 2018-06-22 11:57:46 +10:00
parent 12efb8669e
commit 398e2a17dd

View File

@ -619,7 +619,7 @@ class ShellScintilla(QsciScintilla, code.InteractiveInterpreter):
self.writeCMD(cmd)
import webbrowser
self.updateHistory(cmd)
version = 'master' if 'master' in Qgis.QGIS_VERSION.lower() else re.findall('^\d.[0-9]*', Qgis.QGIS_VERSION)[0]
version = 'master' if 'master' in Qgis.QGIS_VERSION.lower() else re.findall(r'^\d.[0-9]*', Qgis.QGIS_VERSION)[0]
if cmd in ('_pyqgis', '_api', '_cookbook'):
if cmd == '_pyqgis':
webbrowser.open("https://qgis.org/pyqgis/{}".format(version))