mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-04-24 07:17:17 +00:00
do not assign path in context manager as it is deprectated
This commit is contained in:
parent
c73a6c7bae
commit
2cecbb3d53
@ -61,7 +61,8 @@ class RemotePull(LazyLogging):
|
||||
"""
|
||||
clone repository from remote source
|
||||
"""
|
||||
with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (clone_dir := Path(dir_name)):
|
||||
with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name:
|
||||
clone_dir = Path(dir_name)
|
||||
Sources.fetch(clone_dir, self.remote_source)
|
||||
self.repo_copy(clone_dir)
|
||||
|
||||
|
@ -115,7 +115,8 @@ class RemotePush(LazyLogging):
|
||||
result(Result): build result
|
||||
"""
|
||||
try:
|
||||
with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (clone_dir := Path(dir_name)):
|
||||
with TemporaryDirectory(ignore_cleanup_errors=True) as dir_name:
|
||||
clone_dir = Path(dir_name)
|
||||
Sources.fetch(clone_dir, self.remote_source)
|
||||
Sources.push(clone_dir, self.remote_source, *self.packages_update(result, clone_dir),
|
||||
commit_author=self.commit_author)
|
||||
|
@ -84,10 +84,9 @@ class Executor(Cleaner):
|
||||
|
||||
result = Result()
|
||||
for single in updates:
|
||||
with self.in_package_context(single.base), \
|
||||
TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (build_dir := Path(dir_name)):
|
||||
with self.in_package_context(single.base), TemporaryDirectory(ignore_cleanup_errors=True) as dir_name:
|
||||
try:
|
||||
build_single(single, build_dir)
|
||||
build_single(single, Path(dir_name))
|
||||
result.add_success(single)
|
||||
except Exception:
|
||||
self.reporter.set_failed(single.base)
|
||||
|
Loading…
Reference in New Issue
Block a user