Control: tags -1 + patch

On Mon, 22 Jul 2024 16:12:31 +0200 Andreas =?UTF-8?B?UsO2bm5xdWlzdA==?= 
<gus...@debian.org> wrote:
> Package: gdebi
> Version: 0.9.5.7+nmu7
> Severity: minor
> 
> Dear Maintainer,
> 
> gdebi gives a warning when run in the terminal (simply using gdebi as
> the command):
> 
> /usr/bin/gdebi:113: SyntaxWarning: invalid escape sequence '\S'
>   c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
> 
> (and the help output after as expected).
> 

Patch fixing this attached changing the findall command to

c = findall(r"\[(\S)/\S\]", msg)[0].lower()

which seems to work for me.

/Andreas
gus...@debian.org
diff --git a/gdebi b/gdebi
index bee0b8d..1b64709 100755
--- a/gdebi
+++ b/gdebi
@@ -110,7 +110,7 @@ if __name__ == "__main__":
     sys.stdout.flush()
     res = sys.stdin.readline()
     try:
-        c = findall("[[(](\S+)/\S+[])]", msg)[0].lower()
+        c = findall(r"\[(\S)/\S\]", msg)[0].lower()
     except IndexError:
         c = "y"
     if res.lower().startswith(c):

Reply via email to