From: David Stainton Date: Wed, 3 Jun 2015 17:35:28 +0000 (-0700) Subject: Minor code cleanup X-Git-Url: https://git.rkrishnan.org/reliability?a=commitdiff_plain;h=36df858a1ecf2bd9e8addb437836036bf93fc804;p=tahoe-lafs%2Ftahoe-lafs.git Minor code cleanup --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 90f25eea..ab06cfb0 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -507,10 +507,9 @@ class Client(node.Node, pollmixin.PollMixin): dbfile = os.path.join(self.basedir, "private", "magicfolderdb.sqlite") dbfile = abspath_expanduser_unicode(dbfile) - magic_folder_parent_dircap = os.path.join(self.basedir, "private", "magic_folder_parent_dircap") - magic_folder_parent_dircap = abspath_expanduser_unicode(magic_folder_parent_dircap) - fh = open(magic_folder_parent_dircap, "r") - parent_dircap = fh.read().strip() + parent_dircap_path = os.path.join(self.basedir, "private", "magic_folder_parent_dircap") + parent_dircap_path = abspath_expanduser_unicode(magic_folder_parent_dircap) + parent_dircap = fileutil.read(parent_dircap_path).strip() s = drop_upload.DropUploader(self, upload_dircap, parent_dircap, local_dir, dbfile) s.setServiceParent(self)