tests/readlink.py
author liscju <piotr.listkiewicz@gmail.com>
Sun, 05 Jun 2016 23:36:23 +0200
changeset 29377 2c019aac6b99
parent 29175 7bcfb9090c86
child 29485 6a98f9408a50
permissions -rwxr-xr-x
url: extract password database from password manager So far password manager was keeping authentication information so opening new connection and creating new password manager made all saved authentication information lost. This commit separates password manager and password database to make it possible to reuse saved authentication information. This commit violates code checker because it adds add_password method (name with underscore) to passwordmgr object to provide method required by urllib2.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     1
#!/usr/bin/env python
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     2
29175
7bcfb9090c86 readlink: use print_function
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
     3
from __future__ import print_function
7bcfb9090c86 readlink: use print_function
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
     4
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     5
import errno, os, sys
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     6
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     7
for f in sys.argv[1:]:
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     8
    try:
29175
7bcfb9090c86 readlink: use print_function
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
     9
        print(f, '->', os.readlink(f))
25660
328739ea70c3 global: mass rewrite to use modern exception syntax
Gregory Szorc <gregory.szorc@gmail.com>
parents: 10282
diff changeset
    10
    except OSError as err:
10282
08a0f04b56bd many, many trivial check-code fixups
Matt Mackall <mpm@selenic.com>
parents: 5683
diff changeset
    11
        if err.errno != errno.EINVAL:
08a0f04b56bd many, many trivial check-code fixups
Matt Mackall <mpm@selenic.com>
parents: 5683
diff changeset
    12
            raise
29175
7bcfb9090c86 readlink: use print_function
timeless <timeless@mozdev.org>
parents: 25660
diff changeset
    13
        print(f, '->', f, 'not a symlink')
5683
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    14
396c7010b0cd Use common readlink.py instead of own implementations per test script.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    15
sys.exit(0)