Opened 17 years ago
Closed 17 years ago
#9953 closed (duplicate)
postgres backend VERSION_RE fails on beta and RC
| Reported by: | deserat | Owned by: | nobody |
|---|---|---|---|
| Component: | Core (Other) | Version: | 1.0 |
| Severity: | Keywords: | postgres db backend | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
VERSION_RE = re.compile(r'PostgreSQL (\d+)\.(\d+)\.')
Fails to match PostgreSQL 8.3RC3 or any beta etc.... failure is catastrophic and returns a 'NoneType' has no attribute 'groups' message.
major, minor = VERSION_RE.search(version).groups()
Note:
See TracTickets
for help on using tickets.
#8737 already notes VERSION_RE has trouble with beta version strings. I've noted this ticket there and I'm closing this as a dupe because we only need one ticket to track fixing VERSION_RE. You may try the regex from the last comment on that ticket, though it looks like it will have to be tweaked to handle RC version strings.