Codes divers: Check-in [f08cc0bf09]

Divers bouts de code de ma composition

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Little change in authinfo_parser.py regexp
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:f08cc0bf0998ab97956351705740c796915135ab
User & Date: milouse 2018-07-19 07:54:02
Context
2018-09-18
15:22
Upgrade betterodoo check-in: f698ebae61 user: milouse tags: trunk
2018-07-19
07:54
Little change in authinfo_parser.py regexp check-in: f08cc0bf09 user: milouse tags: trunk
2018-07-18
19:58
Use inverse instead of converse and add a link to the index.html page check-in: 5b8b9fe11d user: milouse tags: trunk
Changes

Changes to authinfo_parser.py.

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import sys
import subprocess

AUTHINFO_FILE = "~/.authinfo.gpg"


def extract_infos(machine, infotype):
    s = "machine {} login (?P<login>[^ ]+) port (?P<port>\d+)" \
        " password (?P<pass>[^\n]+)\n".format(machine)
    p = re.compile(s)
    authinfo = subprocess.check_output(
        ["gpg", "-q", "--no-tty", "-d",
         os.path.expanduser(AUTHINFO_FILE)]
    ).decode()
    r = p.search(authinfo)







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import sys
import subprocess

AUTHINFO_FILE = "~/.authinfo.gpg"


def extract_infos(machine, infotype):
    s = "machine {} login (?P<login>[^ ]+)(?: port (?P<port>\\d+))?" \
        " password (?P<pass>[^\n]+)\n".format(machine)
    p = re.compile(s)
    authinfo = subprocess.check_output(
        ["gpg", "-q", "--no-tty", "-d",
         os.path.expanduser(AUTHINFO_FILE)]
    ).decode()
    r = p.search(authinfo)