Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docker/ubuntu/nightswatcher/nightswatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,13 +165,12 @@ def cp(src, dst):

def rm(path):
logger.debug('rm %s', path)
Path(path).unlink()
Path(path).unlink(missing_ok=True)

def symlink(target, link):
logger.debug('ln -sf %s %s', target, link)
link = Path(link)
if link.exists():
link.unlink()
link.unlink(missing_ok=True)
link.symlink_to(target)


Expand Down Expand Up @@ -252,12 +251,13 @@ def on_ota_update(self, release):
self.ota[dest_path.name] = asset.sha256
for name in sorted(removed):
logger.info('Removing asset: %s', name)
sha256 = self.ota.pop(name)
path = self.ota_dir / name
rm(path)
rm(sha256path(path))
if not path.is_symlink():
self.by_sha256[self.ota[name]].discard(path)
del self.ota[name]
self.by_sha256[sha256].discard(path)
self.purge_old_versions()

def on_new_release(self, release):
logger.info('new release: %s', release.tag_name)
Expand Down
2 changes: 1 addition & 1 deletion docker/ubuntu/nightswatcher/settings.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION = 2.1.0
VERSION = 2.2.0

IMAGE_BASE = docker.io/library/ubuntu:24.04
IMAGE_PLATFORM = arm64 x86_64
Expand Down
Loading