Revision 5eae854d kamaki/cli/commands/image_cli.py

b/kamaki/cli/commands/image_cli.py
39 39
from kamaki.clients.image import ImageClient, ClientError
40 40
from kamaki.cli.argument import FlagArgument, ValueArgument, KeyValueArgument, IntArgument
41 41
from .cyclades_cli import _init_cyclades
42
from . import _command_init
42 43

  
43
class _init_image(object):
44
    def __init__(self, arguments={}):
45
        self.arguments=arguments
46
        try:
47
            self.config = self.get_argument('config')
48
        except KeyError:
49
            pass
50

  
51
    def get_argument(self, arg_name):
52
        return self.arguments[arg_name].value
53

  
44
class _init_image(_command_init):
54 45
    def main(self):
55 46
        try:
56 47
            token = self.config.get('image', 'token') or self.config.get('global', 'token')

Also available in: Unified diff