ui: use single quotes for raw strings

part of the previous commit. Missed this change.
This commit is contained in:
Gustavo Iñiguez Goia 2023-11-08 14:28:45 +01:00
parent e6ae9ca6ef
commit 9528fb0e6b
Failed to generate hash of commit
4 changed files with 8 additions and 8 deletions

View file

@ -48,7 +48,7 @@ class LinuxDesktopParser(threading.Thread):
def _parse_exec(self, cmd):
try:
is_flatpak = re.search(r"^/usr/[s]*bin/flatpak.*--command=([a-zA-Z0-9-_\/\.\+]+)", cmd)
is_flatpak = re.search(r'^/usr/[s]*bin/flatpak.*--command=([a-zA-Z0-9-_\/\.\+]+)', cmd)
if is_flatpak:
return is_flatpak.group(1)

View file

@ -621,7 +621,7 @@ class PromptDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
text = parts[len(parts)-1]
# ^(|.*\.)yahoo\.com
dsthost = r'\.'.join(text.split('.')).replace("*", "")
dsthost = r"^(|.*\.)%s" % dsthost[2:]
dsthost = r'^(|.*\.)%s' % dsthost[2:]
return Config.RULE_TYPE_REGEXP, Config.OPERAND_DEST_HOST, dsthost
elif combo.itemData(what_idx) == self.FIELD_REGEX_IP:

View file

@ -23,11 +23,11 @@ DIALOG_UI_PATH = "%s/../res/ruleseditor.ui" % os.path.dirname(sys.modules[__name
class RulesEditorDialog(QtWidgets.QDialog, uic.loadUiType(DIALOG_UI_PATH)[0]):
LOG_TAG = "[rules editor]"
classA_net = r"10\.\d{1,3}\.\d{1,3}\.\d{1,3}"
classB_net = r"172\.1[6-9]\.\d+\.\d+|172\.2[0-9]\.\d+\.\d+|172\.3[0-1]+\.\d{1,3}\.\d{1,3}"
classC_net = r"192\.168\.\d{1,3}\.\d{1,3}"
others_net = r"127\.\d{1,3}\.\d{1,3}\.\d{1,3}|169\.254\.\d{1,3}\.\d{1,3}"
multinets = r"2[32][23459]\.\d{1,3}\.\d{1,3}\.\d{1,3}"
classA_net = r'10\.\d{1,3}\.\d{1,3}\.\d{1,3}'
classB_net = r'172\.1[6-9]\.\d+\.\d+|172\.2[0-9]\.\d+\.\d+|172\.3[0-1]+\.\d{1,3}\.\d{1,3}'
classC_net = r'192\.168\.\d{1,3}\.\d{1,3}'
others_net = r'127\.\d{1,3}\.\d{1,3}\.\d{1,3}|169\.254\.\d{1,3}\.\d{1,3}'
multinets = r'2[32][23459]\.\d{1,3}\.\d{1,3}\.\d{1,3}'
MULTICAST_RANGE = "^(" + multinets + ")$"
LAN_RANGES = "^(" + others_net + "|" + classC_net + "|" + classB_net + "|" + classA_net + "|::1|f[cde].*::.*)$"
LAN_LABEL = "LAN"

View file

@ -402,7 +402,7 @@ class NetworkServices():
for line in etcServices:
if line[0] == "#":
continue
g = re.search(r"([a-zA-Z0-9\-]+)( |\t)+([0-9]+)\/([a-zA-Z0-9\-]+)(.*)\n", line)
g = re.search(r'([a-zA-Z0-9\-]+)( |\t)+([0-9]+)\/([a-zA-Z0-9\-]+)(.*)\n', line)
if g:
self.srv_array.append("{0}/{1} {2}".format(
g.group(1),