From: Zooko O'Whielacronx Date: Tue, 9 Aug 2011 22:09:30 +0000 (-0700) Subject: drop-upload: report the configured local directory being absent differently from... X-Git-Url: https://git.rkrishnan.org/simplejson/components/%22file:/...?a=commitdiff_plain;h=612abca271703508714e51e54e8145b3f003cdfd;p=tahoe-lafs%2Ftahoe-lafs.git drop-upload: report the configured local directory being absent differently from it being a file refs #1429 --- diff --git a/src/allmydata/frontends/drop_upload.py b/src/allmydata/frontends/drop_upload.py index c949b4d7..e8b1cdeb 100644 --- a/src/allmydata/frontends/drop_upload.py +++ b/src/allmydata/frontends/drop_upload.py @@ -36,8 +36,10 @@ class DropUploader(service.MultiService): from twisted.internet import inotify self._inotify = inotify + if not self._local_path.exists(): + raise AssertionError("The '[drop_upload] local.directory' parameter was %s but there is no directory at that location." % quote_output(local_dir_u)) if not self._local_path.isdir(): - raise AssertionError("The drop-upload local path %r was not an existing directory." % quote_output(local_dir_u)) + raise AssertionError("The '[drop_upload] local.directory' parameter was %s but the thing at that location is not a directory." % quote_output(local_dir_u)) # TODO: allow a path rather than a cap URI. self._parent = self._client.create_node_from_uri(upload_dircap)