changeset 1141:a4b54b19cd2e

util: add default parameter to load This will help facilitate moving load_string to just use load.
author Sean Farley <sean.michael.farley@gmail.com>
date Sat, 15 Feb 2014 10:42:54 -0600
parents 9ec3c2e89c94
children f4a32d381e03
files hgsubversion/util.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -179,10 +179,10 @@ def dump(data, file_path):
     json.dump(_convert(data, _scrub), f)
     f.close()
 
-def load(file_path):
+def load(file_path, default=None):
     """Deserialize some data from a path.
     """
-    data = None
+    data = default
     if not os.path.exists(file_path):
         return data