summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--alot/commands/envelope.py2
-rw-r--r--alot/commands/globals.py2
-rw-r--r--alot/crypto.py3
-rw-r--r--alot/db/envelope.py2
-rw-r--r--alot/db/errors.py4
-rw-r--r--alot/errors.py3
6 files changed, 7 insertions, 9 deletions
diff --git a/alot/commands/envelope.py b/alot/commands/envelope.py
index 26271148..0280b303 100644
--- a/alot/commands/envelope.py
+++ b/alot/commands/envelope.py
@@ -9,7 +9,7 @@ from twisted.internet.defer import inlineCallbacks
import datetime
from alot.account import SendingMailFailed
-from alot.db.errors import GPGProblem
+from alot.errors import GPGProblem
from alot import buffers
from alot import commands
from alot import crypto
diff --git a/alot/commands/globals.py b/alot/commands/globals.py
index 8fafe2cb..a4f2fdf3 100644
--- a/alot/commands/globals.py
+++ b/alot/commands/globals.py
@@ -24,7 +24,7 @@ from alot.completion import AccountCompleter
from alot.db.envelope import Envelope
from alot import commands
from alot.settings import settings
-from alot.db.errors import GPGProblem
+from alot.errors import GPGProblem
MODE = 'global'
diff --git a/alot/crypto.py b/alot/crypto.py
index cf6cdd77..c80fff8f 100644
--- a/alot/crypto.py
+++ b/alot/crypto.py
@@ -5,6 +5,7 @@ from email.generator import Generator
from cStringIO import StringIO
import pyme.core
import pyme.constants
+from alot.errors import GPGProblem
def email_as_string(mail):
@@ -94,8 +95,6 @@ class CryptoContext(pyme.core.Context):
result = self.op_keylist_start(str(keyid), 0)
key = self.op_keylist_next()
if self.op_keylist_next() is not None:
- # Deferred import to avoid a circular import dependency
- from alot.db.errors import GPGProblem
raise GPGProblem(("More than one key found matching this filter."
" Please be more specific (use a key ID like 4AC8EE1D)."))
self.op_keylist_end()
diff --git a/alot/db/envelope.py b/alot/db/envelope.py
index 9d8e2599..3c888311 100644
--- a/alot/db/envelope.py
+++ b/alot/db/envelope.py
@@ -17,7 +17,7 @@ import logging
import alot.helper as helper
import alot.crypto as crypto
from alot.settings import settings
-from alot.db.errors import GPGProblem
+from alot.errors import GPGProblem
from attachment import Attachment
from utils import encode_header
diff --git a/alot/db/errors.py b/alot/db/errors.py
index 062a0f6c..eb1a56d7 100644
--- a/alot/db/errors.py
+++ b/alot/db/errors.py
@@ -16,7 +16,3 @@ class NonexistantObjectError(DatabaseError):
"""requested thread or message does not exist in the index"""
pass
-
-class GPGProblem(Exception):
- """A GPG occured while constructing your mail"""
- pass
diff --git a/alot/errors.py b/alot/errors.py
new file mode 100644
index 00000000..29283a45
--- /dev/null
+++ b/alot/errors.py
@@ -0,0 +1,3 @@
+class GPGProblem(Exception):
+ """GPG Error"""
+ pass