mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-20 05:28:04 +00:00
it's an error to have pickle-format files
This commit is contained in:
parent
ce25795e4e
commit
3fd1ca8acb
@ -27,7 +27,9 @@ from allmydata.scripts.default_nodedir import _default_nodedir
|
||||
from allmydata.util.encodingutil import listdir_unicode, quote_local_unicode_path
|
||||
from allmydata.util.configutil import UnknownConfigError
|
||||
from allmydata.util.deferredutil import HookMixin
|
||||
|
||||
from allmydata.storage.crawler import (
|
||||
MigratePickleFileError,
|
||||
)
|
||||
from allmydata.node import (
|
||||
PortAssignmentRequired,
|
||||
PrivacyError,
|
||||
@ -164,6 +166,18 @@ class DaemonizeTheRealService(Service, HookMixin):
|
||||
self.stderr.write("\ntub.port cannot be 0: you must choose.\n\n")
|
||||
elif reason.check(PrivacyError):
|
||||
self.stderr.write("\n{}\n\n".format(reason.value))
|
||||
elif reason.check(MigratePickleFileError):
|
||||
self.stderr.write(
|
||||
"Error\nAt least one 'pickle' format file exists.\n"
|
||||
"The file is {}\n"
|
||||
"You must either delete the pickle-format files"
|
||||
" or migrate them using the command:\n"
|
||||
" tahoe admin migrate-crawler --basedir {}\n\n"
|
||||
.format(
|
||||
reason.value.args[0].path,
|
||||
self.basedir,
|
||||
)
|
||||
)
|
||||
else:
|
||||
self.stderr.write("\nUnknown error\n")
|
||||
reason.printTraceback(self.stderr)
|
||||
|
@ -27,6 +27,14 @@ class TimeSliceExceeded(Exception):
|
||||
pass
|
||||
|
||||
|
||||
class MigratePickleFileError(Exception):
|
||||
"""
|
||||
A pickle-format file exists (the FilePath to the file will be the
|
||||
single arg).
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
def _convert_cycle_data(state):
|
||||
"""
|
||||
:param dict state: cycle-to-date or history-item state
|
||||
|
Loading…
Reference in New Issue
Block a user