mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-19 13:07:56 +00:00
Perform the asserts earlier
This commit is contained in:
parent
ed755cf590
commit
4b0b269b56
@ -1318,17 +1318,16 @@ class Uploader(QueueMixin):
|
||||
"""
|
||||
# Uploader
|
||||
with PROCESS_ITEM(item=item).context():
|
||||
d = DeferredContext(defer.succeed(False))
|
||||
|
||||
relpath_u = item.relpath_u
|
||||
precondition(isinstance(relpath_u, unicode), relpath_u)
|
||||
precondition(not relpath_u.endswith(u'/'), relpath_u)
|
||||
|
||||
d = DeferredContext(defer.succeed(False))
|
||||
if relpath_u is None:
|
||||
item.set_status('invalid_path', self._clock.seconds())
|
||||
return d.addActionFinish()
|
||||
item.set_status('started', self._clock.seconds())
|
||||
|
||||
precondition(isinstance(relpath_u, unicode), relpath_u)
|
||||
precondition(not relpath_u.endswith(u'/'), relpath_u)
|
||||
|
||||
def _maybe_upload(ign, now=None):
|
||||
MAYBE_UPLOAD.log(relpath=relpath_u)
|
||||
|
Loading…
Reference in New Issue
Block a user