Skip to content

Commit

Permalink
PEP8 fixes.
Browse files Browse the repository at this point in the history
Change-Id: If44db0308ff9975de510b84e27f2d9afa66b880e
  • Loading branch information
gabrielhurley committed Dec 8, 2011
1 parent 5fa8539 commit 4d9f5e8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions horizon/horizon/api/deprecated.py
Expand Up @@ -57,6 +57,7 @@ def inner(*args, **kwargs):
raise
return inner


def admin_api(request):
management_url = url_for(request, 'compute', True)
LOG.debug('admin_api connection created using token "%s"'
Expand Down
5 changes: 3 additions & 2 deletions horizon/horizon/dashboards/nova/volumes/forms.py
Expand Up @@ -65,7 +65,8 @@ def __init__(self, *args, **kwargs):
super(AttachForm, self).__init__(*args, **kwargs)
# populate volume_id
volume_id = kwargs.get('initial', {}).get('volume_id', [])
self.fields['volume_id'] = forms.CharField(widget=forms.HiddenInput(), initial=volume_id)
self.fields['volume_id'] = forms.CharField(widget=forms.HiddenInput(),
initial=volume_id)

# Populate instance choices
instance_list = kwargs.get('initial', {}).get('instances', [])
Expand All @@ -77,7 +78,7 @@ def __init__(self, *args, **kwargs):
choices=instances,
label="Attach to Instance",
help_text="Select an instance to attach to.")

def handle(self, request, data):
try:
api.volume_attach(request,
Expand Down
4 changes: 2 additions & 2 deletions horizon/horizon/dashboards/nova/volumes/views.py
Expand Up @@ -94,9 +94,9 @@ def create(request):


@login_required
def attach(request, volume_id):
def attach(request, volume_id):
instances = api.server_list(request)
attach_form, handled = AttachForm.maybe_handle(request,
attach_form, handled = AttachForm.maybe_handle(request,
initial={'volume_id': volume_id,
'instances': instances})

Expand Down

0 comments on commit 4d9f5e8

Please sign in to comment.