Skip to content

Commit 9cf5f98

Browse files
authored
Merge pull request #367 from antonlacon/raw-strings
Use raw strings with warning regexes
2 parents 75c2d18 + 38b3ec3 commit 9cf5f98

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

resources/lib/modules/connman.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ class connman(modules.Module):
432432
'entry': 'Tethering',
433433
'value': ['1'],
434434
},
435-
'validate': '^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$',
435+
'validate': r'^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$',
436436
'InfoText': 728,
437437
},
438438
'TetheringPassphrase': {
@@ -488,7 +488,7 @@ class connman(modules.Module):
488488
'value': '',
489489
'action': 'set_timeservers',
490490
'type': 'text',
491-
'validate': '^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$|^$',
491+
'validate': r'^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$|^$',
492492
'InfoText': 732,
493493
},
494494
'1': {
@@ -497,7 +497,7 @@ class connman(modules.Module):
497497
'value': '',
498498
'action': 'set_timeservers',
499499
'type': 'text',
500-
'validate': '^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$|^$',
500+
'validate': r'^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$|^$',
501501
'InfoText': 733,
502502
},
503503
'2': {
@@ -506,7 +506,7 @@ class connman(modules.Module):
506506
'value': '',
507507
'action': 'set_timeservers',
508508
'type': 'text',
509-
'validate': '^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$|^$',
509+
'validate': r'^([a-zA-Z0-9](?:[a-zA-Z0-9-\.]*[a-zA-Z0-9]))$|^$',
510510
'InfoText': 734,
511511
},
512512
},

resources/lib/oe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def timestamp():
681681

682682
def split_dialog_text(text):
683683
ret = [''] * 3
684-
txt = re.findall('.{1,60}(?:\W|$)', text)
684+
txt = re.findall(r'.{1,60}(?:\W|$)', text)
685685
for x in range(0, 2):
686686
if len(txt) > x:
687687
ret[x] = txt[x]

0 commit comments

Comments
 (0)