From: David Stainton Date: Tue, 14 Jul 2015 23:41:16 +0000 (-0700) Subject: simplify _should_download helper method X-Git-Url: https://git.rkrishnan.org/reedownlee?a=commitdiff_plain;h=bc77ac24c34811c6fad67868f779fad09b1a9b1a;p=tahoe-lafs%2Ftahoe-lafs.git simplify _should_download helper method --- diff --git a/src/allmydata/frontends/magic_folder.py b/src/allmydata/frontends/magic_folder.py index 4b51606c..46e0960e 100644 --- a/src/allmydata/frontends/magic_folder.py +++ b/src/allmydata/frontends/magic_folder.py @@ -121,13 +121,7 @@ class MagicFolder(service.MultiService): latest version wins. """ v = self._db.get_local_file_version(path) - if v is None: - return True - else: - if v < remote_version: - return True - else: - return False + return (v is None or v < remote_version) def _get_collective_latest_file(self, filename): """_get_collective_latest_file takes a file path pointing to a file managed by