Skip to content

Commit

Permalink
Fix escaping in raw regexp strings. #1441
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeit-internet2 committed Jun 27, 2024
1 parent e008658 commit 8ff9773
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions pscheduler-tool-tcpping/tcpping/run
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,18 @@ result = {


# TCP Ping Results: Connections (Total/Pass/Fail): [3/3/0] (Failed: 0%)
CONNECTED = re.compile(r'^Connected to\\s*[^\\s]+'
r'\\s+\\(([^)]+)\)'
r'\\s+.*:'
r'\\s+tcp_seq=([0-9]+)'
r'\\s+time=([0-9.]+) ms$')
CONNECTED = re.compile(r'^Connected to\s*[^\s]+'
r'\s+\(([^)]+)\)'
r'\s+.*:'
r'\s+tcp_seq=([0-9]+)'
r'\s+time=([0-9.]+) ms$')

# TCP Ping Results: Connections (Total/Pass/Fail): [3/3/0] (Failed: 0%)
COUNTED = re.compile(r'^TCP Ping Results: Connections \\(Total/Pass/Fail\\): \\[([0-9]+)/([0-9]+)/([0-9]+)\\]')
COUNTED = re.compile(r'^TCP Ping Results: Connections \(Total/Pass/Fail\): \[([0-9]+)/([0-9]+)/([0-9]+)\]')

# rtt min/avg/max/mdev = 32.660/32.827/33.150/0.280 ms
STATS = re.compile(r'^rtt min/avg/max/mdev\\s+=\\s+'
r'([0-9.]+)/([0-9.]+)/([0-9.]+)/([0-9.]+)\\s+ms')
STATS = re.compile(r'^rtt min/avg/max/mdev\s+=\s+'
r'([0-9.]+)/([0-9.]+)/([0-9.]+)/([0-9.]+)\s+ms')



Expand Down
2 changes: 1 addition & 1 deletion python-pscheduler/pscheduler/pscheduler/jsonval.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
"oneOf": [
{
"type": "string",
"pattern": r'^[0-9]+(\\.[0-9]+)?(\\s*[KkMmGgTtPpEeZzYy][Ii]?)?$'
"pattern": r'^[0-9]+(\.[0-9]+)?(\s*[KkMmGgTtPpEeZzYy][Ii]?)?$'
},
{
"type": "integer"
Expand Down

0 comments on commit 8ff9773

Please sign in to comment.