Mercurial > p > roundup > code
comparison roundup/backends/back_postgresql.py @ 7718:3da452f4a3ac
fix: make regexp a raw string
So I don't have to escape the \s sequences.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 23 Dec 2023 21:59:08 -0500 |
| parents | 2eb976e1de2a |
| children | 3071db43bfb6 |
comparison
equal
deleted
inserted
replaced
| 7717:2eb976e1de2a | 7718:3da452f4a3ac |
|---|---|
| 101 # | 101 # |
| 102 # https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS | 102 # https://www.postgresql.org/docs/current/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS |
| 103 # | 103 # |
| 104 # with suitable quoting but ... really. | 104 # with suitable quoting but ... really. |
| 105 search = re.search( | 105 search = re.search( |
| 106 'FATAL:\s+database\s+"([^"\s]*)"\s+does\s+not\s+exist', | 106 r'FATAL:\s+database\s+"([^"\s]*)"\s+does\s+not\s+exist', |
| 107 message.args[0]) | 107 message.args[0]) |
| 108 if search: | 108 if search: |
| 109 dbname = search.groups()[0] | 109 dbname = search.groups()[0] |
| 110 return dbname | 110 return dbname |
| 111 | 111 |
