File: fix-raw-string.patch

package info (click to toggle)
pyasn 1.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 16,100 kB
  • sloc: python: 1,541; ansic: 1,358; sh: 8; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 758 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: Fix raw string
 This avoids a warning during install of the package.
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1070219
Forwarded: no
Last-Update: 2024-05-02

--- pyasn-1.6.1.orig/pyasn/__init__.py
+++ pyasn-1.6.1/pyasn/__init__.py
@@ -198,7 +198,7 @@ class pyasn(object):
         :param asdot:  "AS[Number].[Number]" representation of an autonomous system
         :return: 32bit AS number
         """
-        pattern = re.compile("^[AS]|[as]|[aS]|[As]][0-9]*(\.)?[0-9]+")
+        pattern = re.compile(r"^[AS]|[as]|[aS]|[As]][0-9]*(\.)?[0-9]+")
         match = pattern.match(asdot)
         if not match:
             raise ValueError("Invalid asdot format for input. input format must be something like"