1
0
mirror of https://github.com/gryf/boxpy.git synced 2026-02-15 21:45:47 +01:00

Minor fixes for logging. Removed unused exception classes.

This commit is contained in:
2021-06-27 17:26:06 +02:00
parent d1481ea02f
commit 7a9336f179

16
box.py
View File

@@ -240,14 +240,6 @@ class BoxVBoxFailure(BoxError):
pass pass
class BoxConvertionError(BoxError):
pass
class BoxSysCommandError(BoxError):
pass
class FakeLogger: class FakeLogger:
""" """
print based "logger" class. I like to use 'end' parameter of print print based "logger" class. I like to use 'end' parameter of print
@@ -259,8 +251,9 @@ class FakeLogger:
debug = 1 debug = 1
details = 2 details = 2
info = 3 info = 3
warning = 4 header = 4
fatal = 5 warning = 5
fatal = 6
""" """
def __init__(self, colors=False): def __init__(self, colors=False):
@@ -787,6 +780,7 @@ class Image:
return self.vbox.move_and_resize_image(vdi_path, disk_img, size) return self.vbox.move_and_resize_image(vdi_path, disk_img, size)
def cleanup(self): def cleanup(self):
LOG.info('Image: Cleaning up temporary files from "%s"', self._tmp)
Run(['rm', '-fr', self._tmp]) Run(['rm', '-fr', self._tmp])
def _convert_to_raw(self): def _convert_to_raw(self):
@@ -962,7 +956,7 @@ class IsoImage:
return os.path.join(self._tmp, CLOUD_IMAGE) return os.path.join(self._tmp, CLOUD_IMAGE)
def cleanup(self): def cleanup(self):
LOG.info('Cleaning up temporary files from "%s"', self._tmp) LOG.info('IsoImage: Cleaning up temporary files from "%s"', self._tmp)
Run(['rm', '-fr', self._tmp]) Run(['rm', '-fr', self._tmp])
def _create_cloud_image(self): def _create_cloud_image(self):