PEP8 and general cleanups

This commit is contained in:
Roberto Rosario
2012-02-22 11:57:00 -04:00
parent af9be90849
commit f484e1a9c3
19 changed files with 44 additions and 49 deletions
+1 -1
View File
@@ -178,7 +178,7 @@ class GPG(object):
self.keyservers = keyservers
self.gpg = gnupg.GPG(**kwargs)
def verify_file(self, file_input, detached_signature=None, fetch_key=False):
"""
Verify the signature of a file.
-1
View File
@@ -1,6 +1,5 @@
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext
class KeySearchForm(forms.Form):
+1 -1
View File
@@ -8,6 +8,6 @@ from .conf.settings import KEYSERVERS, GPG_HOME
try:
gpg = GPG(home=GPG_HOME, keyservers=KEYSERVERS)
except Exception, e:
gpg = GPG(keyservers=KEYSERVERS)
gpg = GPG(keyservers=KEYSERVERS)
sys.stderr.write(u'ERROR: GPG initialization error: %s\n' % e)
sys.stderr.write(u'INFO: Initializating GPG with system default home\n')
+4 -5
View File
@@ -9,12 +9,11 @@ from django.template import RequestContext
from django.contrib import messages
from permissions.models import Permission
from common.utils import (urlquote, encapsulate)
from common.utils import encapsulate
from .api import Key, SIGNATURE_STATES
from .api import Key
from .runtime import gpg
from .exceptions import (GPGVerificationError, KeyFetchingError,
KeyImportError)
from .exceptions import KeyFetchingError, KeyImportError
from .forms import KeySearchForm
from .permissions import (PERMISSION_KEY_VIEW, PERMISSION_KEY_DELETE,
PERMISSION_KEYSERVER_QUERY, PERMISSION_KEY_RECEIVE)
@@ -40,7 +39,7 @@ def key_receive(request, key_id):
except (KeyImportError, KeyError, TypeError), e:
messages.error(
request,
_(u'Unable to import key id: %(key_id)s; %(error)s') %
_(u'Unable to import key id: %(key_id)s; %(error)s') %
{
'key_id': key_id,
'error': e,