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/pf/content/vdrive?a=commitdiff_plain;h=fa3512b7b4f050d2fd004f01cf30f86273bf91ca;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