Revision 8814e07c snf-cyclades-app/synnefo/api/management/commands/network-list.py

b/snf-cyclades-app/synnefo/api/management/commands/network-list.py
71 71
                 " that displayed entries must satisfy. e.g."
72 72
                 " --filter-by \"name=Network-1,link!=prv0\"."
73 73
                 " Available keys are: %s" % ", ".join(FIELDS)),
74
        make_option('--uuids',
74
        make_option(
75
            '--uuids',
75 76
            action='store_true',
76 77
            dest='use_uuids',
77 78
            default=False,
......
82 83
        if args:
83 84
            raise CommandError("Command doesn't accept any arguments")
84 85

  
86
        use_uuids = options["use_uuids"]
85 87
        if options['deleted']:
86 88
            networks = Network.objects.all()
87 89
        else:
......
102 104
        else:
103 105
            headers.extend(['IPv4 Subnet', 'IPv4 Gateway'])
104 106

  
105
        if options['use_uuids'] is False:
107
        if not use_uuids:
106 108
            ucache = UUIDCache()
107 109

  
108 110
        table = []
109 111
        for network in networks.order_by("id"):
110 112
            user = network.userid
111
            if options['use_uuids'] is False:
113
            if not use_uuids:
112 114
                user = ucache.get_user(network.userid)
113 115

  
114 116
            fields = [str(network.id),

Also available in: Unified diff