Set is_temporary.
This commit is contained in:
parent
ef1d684b65
commit
3e41558f91
3 changed files with 6 additions and 0 deletions
|
@ -100,6 +100,8 @@ class Session(object):
|
||||||
def external_path(self, path: str) -> str:
|
def external_path(self, path: str) -> str:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
is_temporary: bool
|
||||||
|
|
||||||
|
|
||||||
class SessionSetupFailure(Exception):
|
class SessionSetupFailure(Exception):
|
||||||
"""Session failed to be set up."""
|
"""Session failed to be set up."""
|
||||||
|
|
|
@ -112,3 +112,5 @@ class PlainSession(Session):
|
||||||
|
|
||||||
def setup_from_directory(self, path):
|
def setup_from_directory(self, path):
|
||||||
return path, path
|
return path, path
|
||||||
|
|
||||||
|
is_temporary = False
|
||||||
|
|
|
@ -215,3 +215,5 @@ class SchrootSession(Session):
|
||||||
export_directory = os.path.join(directory, subdir)
|
export_directory = os.path.join(directory, subdir)
|
||||||
shutil.copytree(path, export_directory, dirs_exist_ok=True)
|
shutil.copytree(path, export_directory, dirs_exist_ok=True)
|
||||||
return export_directory, os.path.join(reldir, subdir)
|
return export_directory, os.path.join(reldir, subdir)
|
||||||
|
|
||||||
|
is_temporary = True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue