]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
simplify _should_download helper method
authorDavid Stainton <dstainton415@gmail.com>
Tue, 14 Jul 2015 23:41:16 +0000 (16:41 -0700)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 20 Jul 2015 23:48:10 +0000 (00:48 +0100)
src/allmydata/frontends/magic_folder.py

index 4b51606cd436df315606832a055d9ec259f8e65e..46e0960e6a8b9bd80651c32748b186c79365f64f 100644 (file)
@@ -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