File: utils.py

package info (click to toggle)
pg8000 1.31.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 836 kB
  • sloc: python: 8,273; sh: 25; makefile: 9
file content (6 lines) | stat: -rw-r--r-- 148 bytes parent folder | download
1
2
3
4
5
6
import re


def parse_server_version(version):
    major = re.match(r"\d+", version).group()  # leading digits in 17.0, 17rc1
    return int(major)