from allmydata.immutable.offloaded import Helper
from allmydata.control import ControlServer
from allmydata.introducer.client import IntroducerClient
-from allmydata.util import hashutil, base32, pollmixin, log, keyutil, idlib
+from allmydata.util import fileutil, hashutil, base32, pollmixin, log, keyutil, idlib
from allmydata.util.encodingutil import get_filesystem_encoding, \
from_utf8_or_none
from allmydata.util.fileutil import abspath_expanduser_unicode
dbfile = abspath_expanduser_unicode(dbfile)
parent_dircap_path = os.path.join(self.basedir, "private", "magic_folder_parent_dircap")
- parent_dircap_path = abspath_expanduser_unicode(magic_folder_parent_dircap)
+ parent_dircap_path = abspath_expanduser_unicode(parent_dircap_path)
parent_dircap = fileutil.read(parent_dircap_path).strip()
s = drop_upload.DropUploader(self, upload_dircap, parent_dircap, local_dir, dbfile)
self._upload_deque = deque()
self.is_upload_ready = False
- if inotify is None:
- if sys.platform == "win32":
- from allmydata.windows import inotify
- else:
- from twisted.internet import inotify
- self._inotify = inotify
+ self._inotify = inotify or get_inotify_module()
if not self._local_path.exists():
raise AssertionError("The '[drop_upload] local.directory' parameter was %s "
basedir1 = "test_client.Basic.test_create_drop_uploader1"
os.mkdir(basedir1)
+
fileutil.write(os.path.join(basedir1, "tahoe.cfg"),
config + "local.directory = " + local_dir_utf8 + "\n")
self.failUnlessRaises(MissingConfigEntry, client.Client, basedir1)
raise NotImplementedError("blah")
self.patch(drop_upload, 'get_inotify_module', _not_implemented)
self.shouldFail(NotImplementedError, 'unsupported', 'blah',
- DropUploader, client, upload_dircap, errors_dir, magicfolderdb)
+ DropUploader, client, upload_dircap, '', errors_dir, magicfolderdb)
d.addCallback(_check_errors)
return d