mirror of
https://git.launchpad.net/~ubuntu-release/britney/+git/britney2-ubuntu
synced 2025-04-12 03:31:11 +00:00
Fix typo in parameter
Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
parent
c219c42804
commit
206d5ac5df
@ -641,22 +641,22 @@ def check_installability(inst_tester, binaries, arch, updates, affected, check_a
|
||||
test_installability(inst_tester, name, pkg_id, broken, nuninst_arch)
|
||||
|
||||
|
||||
def possibly_compressed(path, permitted_compressesion=None):
|
||||
def possibly_compressed(path, *, permitted_compressions=None):
|
||||
"""Find and select a (possibly compressed) variant of a path
|
||||
|
||||
If the given path exists, it will be returned
|
||||
|
||||
:param path The base path.
|
||||
:param permitted_compressesion An optional list of alternative extensions to look for.
|
||||
:param permitted_compressions An optional list of alternative extensions to look for.
|
||||
Defaults to "gz" and "xz".
|
||||
:returns The path given possibly with one of the permitted extensions. Will raise a
|
||||
FileNotFoundError
|
||||
"""
|
||||
if os.path.exists(path):
|
||||
return path
|
||||
if permitted_compressesion is None:
|
||||
permitted_compressesion = ['gz', 'xz']
|
||||
for ext in permitted_compressesion:
|
||||
if permitted_compressions is None:
|
||||
permitted_compressions = ['gz', 'xz']
|
||||
for ext in permitted_compressions:
|
||||
cpath = "%s.%s" % (path, ext)
|
||||
if os.path.exists(cpath):
|
||||
return cpath
|
||||
|
Loading…
x
Reference in New Issue
Block a user