Revision f04ada8d

b/snf-cyclades-app/synnefo/management/common.py
133 133
def get_subnet(subnet_id, for_update=True):
134 134
    """Get a Subnet object by its ID."""
135 135
    try:
136
        subet_id = int(subnet_id)
137
    except (ValueError, TypeError):
138
        raise CommandError("Invalid subnet ID: %s" % subnet_id)
139

  
140
    try:
136 141
        subnets = Subnet.objects
137 142
        if for_update:
138 143
            subnets.select_for_update()

Also available in: Unified diff