Add subpath argument.

This commit is contained in:
Jelmer Vernooij 2021-03-18 21:11:21 +00:00
parent 3aeb984147
commit 2ceef03c8a
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8

View file

@ -28,9 +28,9 @@ from buildlog_consultant.sbuild import (
from . import DetailedFailure
def export_vcs_tree(tree, directory):
def export_vcs_tree(tree, directory, subpath=""):
try:
export(tree, directory, "dir", None)
export(tree, directory, "dir", None, subdir=(subpath or None))
except OSError as e:
if e.errno == errno.ENOSPC:
raise DetailedFailure(1, ["export"], NoSpaceOnDevice())