From 5a8503a730b23458f27e8fd2b6f10e80241e023e Mon Sep 17 00:00:00 2001
From: David Stainton <dstainton415@gmail.com>
Date: Wed, 3 Jun 2015 10:35:28 -0700
Subject: [PATCH] Minor code cleanup

---
 src/allmydata/client.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

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)
-- 
2.45.2