From 61250fed0def8fc51a334665ea9e17c698021074 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Mon, 25 Mar 2019 14:00:52 -0700 Subject: [PATCH] Prefix regex strings with 'r' --- ddusb.py | 2 +- quickdel.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ddusb.py b/ddusb.py index 8f821fb..eb8ae68 100644 --- a/ddusb.py +++ b/ddusb.py @@ -8,7 +8,7 @@ import re import subprocess # ========== Constants ========== -COMMENT_PATTERN = "^[#;]" +COMMENT_PATTERN = r"^[#;]" EXCLUDE_FILE = "/etc/helper-scripts/ddusb-exclude.conf" E_BLOCKDEVICE_ERROR = 1 diff --git a/quickdel.py b/quickdel.py index a90d905..22efadc 100644 --- a/quickdel.py +++ b/quickdel.py @@ -33,7 +33,7 @@ from termcolor import colored FD_BIN = "/usr/bin/fd" FD_OPTS = ["--hidden"] # Matches 'y' or 'yes' only, ignoring case -USER_RESPONSE_YES = "^[Yy]{1}([Ee]{1}[Ss]{1})?$" +USER_RESPONSE_YES = r"^[Yy]{1}([Ee]{1}[Ss]{1})?$" E_NO_RESULTS = 1 E_USER_RESPONSE_NO = 2