Fix in regular expression for modern python
This commit is contained in:
parent
aff9bad483
commit
d94cb59af8
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ class WebAppTask(Task):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.data['path']!='/' and not re.match('^/[\w.-]*/$', self.data['path'].strip()):
|
if self.data['path']!='/' and not re.match(r'^/[\w.-]*/$', self.data['path'].strip()):
|
||||||
self.logtask.insert({'status':1, 'progress': 100, 'error': 1, 'task_id': self.id, 'server': self.server, 'message': 'Error: format wrong for path, you need this format / or /path/ '+self.data['path']})
|
self.logtask.insert({'status':1, 'progress': 100, 'error': 1, 'task_id': self.id, 'server': self.server, 'message': 'Error: format wrong for path, you need this format / or /path/ '+self.data['path']})
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue