The error function main.py used for outputing errors has been removed
and the code was not updated to use the error method of SimpleOutput
output class.
Also did a minor cleanup: git_os_class function was renamed to os_cls
from image_creator.util import get_command, FatalError, MD5
from image_creator.output.cli import SilentOutput, SimpleOutput, \
OutputWthProgress
from image_creator.util import get_command, FatalError, MD5
from image_creator.output.cli import SilentOutput, SimpleOutput, \
OutputWthProgress
-from image_creator.os_type import get_os_class
+from image_creator.os_type import os_cls
from image_creator.kamaki_wrapper import Kamaki
import sys
import os
from image_creator.kamaki_wrapper import Kamaki
import sys
import os
dev = disk.get_device(snapshot)
dev.mount()
dev = disk.get_device(snapshot)
dev.mount()
- osclass = get_os_class(dev.distro, dev.ostype)
- image_os = osclass(dev.root, dev.g, out)
+ cls = os_cls(dev.distro, dev.ostype)
+ image_os = cls(dev.root, dev.g, out)
out.output()
for sysprep in options.disabled_syspreps:
out.output()
for sysprep in options.disabled_syspreps:
ret = image_creator()
sys.exit(ret)
except FatalError as e:
ret = image_creator()
sys.exit(ret)
except FatalError as e:
- if sys.stdout.isatty():
- error(e)
- else:
- error(e, True, False)
+ colored = sys.stderr.isatty()
+ SimpleOutput(colored).error(e)
-def get_os_class(distro, osfamily):
+def os_cls(distro, osfamily):
module = None
classname = None
try:
module = None
classname = None
try: