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/en/frontends/%3C?a=commitdiff_plain;h=3e571fc4cf4732272c2ffc2dec75950129ae2a19;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