summaryrefslogtreecommitdiff
path: root/alot/db/manager.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2014-08-02 18:01:57 +0200
committerPatrick Totzke <patricktotzke@gmail.com>2014-08-02 18:01:57 +0200
commit30dbe55e0281210af339a13fa6c12c7aa5167313 (patch)
treeba7c99a6f58b80163bb0a14c70a8102403cfe912 /alot/db/manager.py
parent2a93e66df116af737c2c0da1b9132542a803c1fb (diff)
just formating (pep8 etc.)
Diffstat (limited to 'alot/db/manager.py')
-rw-r--r--alot/db/manager.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/alot/db/manager.py b/alot/db/manager.py
index 5450b788..2847956d 100644
--- a/alot/db/manager.py
+++ b/alot/db/manager.py
@@ -16,16 +16,16 @@ from collections import deque
from message import Message
from alot.settings import settings
from thread import Thread
-from errors import DatabaseError
-from errors import DatabaseLockedError
-from errors import DatabaseROError
-from errors import NonexistantObjectError
+from .errors import DatabaseError
+from .errors import DatabaseLockedError
+from .errors import DatabaseROError
+from .errors import NonexistantObjectError
from alot.db import DB_ENC
from alot.db.utils import is_subdir_of
-
class FillPipeProcess(multiprocessing.Process):
+
def __init__(self, it, stdout, stderr, pipe, fun=(lambda x: x)):
multiprocessing.Process.__init__(self)
self.it = it
@@ -66,6 +66,7 @@ class FillPipeProcess(multiprocessing.Process):
class DBManager(object):
+
"""
Keeps track of your index parameters, maintains a write-queue and
lets you look up threads and messages directly to the persistent wrapper
@@ -362,7 +363,7 @@ class DBManager(object):
with os.fdopen(fd) as handle:
for line in handle:
logging.debug('Worker process {0} said on {1}: {2}'.format(
- process.pid, prefix, line.rstrip()))
+ process.pid, prefix, line.rstrip()))
# spawn two threads that read from the stdout and stderr pipes
# and write anything that appears there to the log
@@ -420,7 +421,7 @@ class DBManager(object):
"""
if self.ro:
raise DatabaseROError()
- if not is_subdir_of(path,self.path):
+ if not is_subdir_of(path, self.path):
msg = 'message path %s ' % path
msg += ' is not below notmuchs '
msg += 'root path (%s)' % self.path