Revision bb4db5a8 image_creator/main.py

b/image_creator/main.py
39 39
from image_creator.util import get_command, FatalError, MD5
40 40
from image_creator.output.cli import SilentOutput, SimpleOutput, \
41 41
                                     OutputWthProgress
42
from image_creator.os_type import get_os_class
42
from image_creator.os_type import os_cls
43 43
from image_creator.kamaki_wrapper import Kamaki
44 44
import sys
45 45
import os
......
187 187
        dev = disk.get_device(snapshot)
188 188
        dev.mount()
189 189

  
190
        osclass = get_os_class(dev.distro, dev.ostype)
191
        image_os = osclass(dev.root, dev.g, out)
190
        cls = os_cls(dev.distro, dev.ostype)
191
        image_os = cls(dev.root, dev.g, out)
192 192
        out.output()
193 193

  
194 194
        for sysprep in options.disabled_syspreps:
......
283 283
        ret = image_creator()
284 284
        sys.exit(ret)
285 285
    except FatalError as e:
286
        if sys.stdout.isatty():
287
            error(e)
288
        else:
289
            error(e, True, False)
286
        colored = sys.stderr.isatty()
287
        SimpleOutput(colored).error(e)
290 288
        sys.exit(1)
291 289

  
292 290

  

Also available in: Unified diff