String formatting simplification

This commit is contained in:
Disassembler 2019-10-05 22:42:29 +02:00
parent 62a6612a79
commit 93cc9f435b
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
3 changed files with 4 additions and 4 deletions

@ -1 +1 @@
Subproject commit b02fc3f42c65d8833451e41b550f7588c9de2cc2 Subproject commit ecfa2251877abd38e681b0faa35fc4c246723e11

View File

@ -47,7 +47,7 @@ class AppPacker(Packer):
def register(self): def register(self):
# Register package in global repository metadata file # Register package in global repository metadata file
print('Registering package {}'.format(self.app.name)) print('Registering package', self.app.name)
self.packages['apps'][self.app.name] = self.app.conf.copy() self.packages['apps'][self.app.name] = self.app.conf.copy()
self.packages['apps'][self.app.name]['size'] = self.tar_size self.packages['apps'][self.app.name]['size'] = self.tar_size
self.packages['apps'][self.app.name]['pkgsize'] = self.xz_size self.packages['apps'][self.app.name]['pkgsize'] = self.xz_size

View File

@ -40,13 +40,13 @@ class ImagePacker(Packer):
def create_archive(self): def create_archive(self):
# Create archive # Create archive
print('Archiving', self.image.path) print('Archiving', self.image.name)
subprocess.run(['tar', '--xattrs', '-cpf', self.tar_path, self.image.name], cwd=LXC_STORAGE_DIR) subprocess.run(['tar', '--xattrs', '-cpf', self.tar_path, self.image.name], cwd=LXC_STORAGE_DIR)
self.compress_archive() self.compress_archive()
def register(self): def register(self):
# Register image in global repository metadata file # Register image in global repository metadata file
print('Registering package {}'.format(self.image.name)) print('Registering package', self.image.name)
self.packages['images'][self.image.name] = self.image.conf.copy() self.packages['images'][self.image.name] = self.image.conf.copy()
self.packages['images'][self.image.name]['size'] = self.tar_size self.packages['images'][self.image.name]['size'] = self.tar_size
self.packages['images'][self.image.name]['pkgsize'] = self.xz_size self.packages['images'][self.image.name]['pkgsize'] = self.xz_size