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
|
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)
|
Sources.fetch(clone_dir, self.remote_source)
|
||||||
self.repo_copy(clone_dir)
|
self.repo_copy(clone_dir)
|
||||||
|
|
||||||
|
@ -115,7 +115,8 @@ class RemotePush(LazyLogging):
|
|||||||
result(Result): build result
|
result(Result): build result
|
||||||
"""
|
"""
|
||||||
try:
|
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.fetch(clone_dir, self.remote_source)
|
||||||
Sources.push(clone_dir, self.remote_source, *self.packages_update(result, clone_dir),
|
Sources.push(clone_dir, self.remote_source, *self.packages_update(result, clone_dir),
|
||||||
commit_author=self.commit_author)
|
commit_author=self.commit_author)
|
||||||
|
@ -84,10 +84,9 @@ class Executor(Cleaner):
|
|||||||
|
|
||||||
result = Result()
|
result = Result()
|
||||||
for single in updates:
|
for single in updates:
|
||||||
with self.in_package_context(single.base), \
|
with self.in_package_context(single.base), TemporaryDirectory(ignore_cleanup_errors=True) as dir_name:
|
||||||
TemporaryDirectory(ignore_cleanup_errors=True) as dir_name, (build_dir := Path(dir_name)):
|
|
||||||
try:
|
try:
|
||||||
build_single(single, build_dir)
|
build_single(single, Path(dir_name))
|
||||||
result.add_success(single)
|
result.add_success(single)
|
||||||
except Exception:
|
except Exception:
|
||||||
self.reporter.set_failed(single.base)
|
self.reporter.set_failed(single.base)
|
||||||
|
Loading…
Reference in New Issue
Block a user