Debian Codegraph @

debian/patches/fix-syntax-warning-when-installing.patch

raw symbols SCIP
1 Description: Fix syntax warning when installing
2 Author: Thomas Goirand <[email protected]>
3 Bug-Debian: https://bugs.debian.org/1087044
4 Forwarded: no
5 Last-Update: 2025-01-02
6
7 --- redfishtool-1.1.5.orig/redfishtoollib/Managers.py
8 +++ redfishtool-1.1.5/redfishtoollib/Managers.py
9 @@ -379,7 +379,7 @@ class RfManagersOperations():
10 rft.printErr(" <dateTimeString> in form: \"YYYY-MM-DDThh:mm:ss[+/-]hh:ss\"")
11 return(8,None,False,None)
12 else: #we have an arg[1]
13 - datePattern="(^[2][0]\d{2}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[-+][0-1][0-9]:[0-5][0-9]$)" # YYYY-MM-DDTHH:mm:ss[+/-]hh:ss
14 + datePattern=r"(^[2][0]\d{2}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}[-+][0-1][0-9]:[0-5][0-9]$)" # YYYY-MM-DDTHH:mm:ss[+/-]hh:ss
15 dateMatch=re.search(datePattern,sc.args[1]) # sc.args[1]=<dateTimeString>
16 if( dateMatch ):
17 dateTimeString=(sc.args[1]) # keep it a string
18 --- redfishtool-1.1.5.orig/redfishtoollib/redfishtoolTransport.py
19 +++ redfishtool-1.1.5/redfishtoollib/redfishtoolTransport.py
20 @@ -1249,11 +1249,11 @@ class RfTransport():
21 resourceOdataType=resource["@odata.type"]
22
23 #the odataType format is: <namespace>.<version>.<type> where version may have periods in it
24 - odataTypeMatch = re.compile('^#([a-zA-Z0-9]*)\.([a-zA-Z0-9\._]*)\.([a-zA-Z0-9]*)$')
25 + odataTypeMatch = re.compile(r'^#([a-zA-Z0-9]*)\.([a-zA-Z0-9\._]*)\.([a-zA-Z0-9]*)$')
26 resourceMatch = re.match(odataTypeMatch, resourceOdataType)
27 if(resourceMatch is None):
28 # try with no version component
29 - odataTypeMatch = re.compile('^#([a-zA-Z0-9]*)\.([a-zA-Z0-9]*)$')
30 + odataTypeMatch = re.compile(r'^#([a-zA-Z0-9]*)\.([a-zA-Z0-9]*)$')
31 resourceMatch = re.match(odataTypeMatch, resourceOdataType)
32 if (resourceMatch is None):
33 rft.printErr("Transport:parseOdataType: Error parsing @odata.type")