changeset 1129:063cae4e35af

layouts: use util.load instead of bare pickle
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 23 Aug 2013 10:57:09 -0500
parents 2922f4881a04
children ed4804ee68c4
files hgsubversion/layouts/standard.py
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/layouts/standard.py
+++ b/hgsubversion/layouts/standard.py
@@ -1,5 +1,4 @@
 import os.path
-import pickle
 
 import base
 
@@ -67,12 +66,9 @@ class StandardLayout(base.BaseLayout):
         if self._tag_locations is None:
 
             tag_locations_file = os.path.join(meta_data_dir, 'tag_locations')
+            self._tag_locations = util.load(tag_locations_file)
 
-            if os.path.exists(tag_locations_file):
-                f = open(tag_locations_file)
-                self._tag_locations = pickle.load(f)
-                f.close()
-            else:
+            if not self._tag_locations:
                 self._tag_locations = self.ui.configlist('hgsubversion',
                                                         'tagpaths',
                                                         ['tags'])