Merge pull request #92 from salt-formulas/andrewp-fix-yaml-git-errors

fix yaml git error reporting
diff --git a/reclass/errors.py b/reclass/errors.py
index 24bdfaa..df35ef8 100644
--- a/reclass/errors.py
+++ b/reclass/errors.py
@@ -117,7 +117,7 @@
 
 class InterpolationError(ReclassException):
 
-    def __init__(self, msg, rc=posix.EX_DATAERR, nodename='', uri=None, context=None, tbFlag=True):
+    def __init__(self, msg=None, rc=posix.EX_DATAERR, nodename='', uri=None, context=None, tbFlag=True):
         super(InterpolationError, self).__init__(rc=rc, msg=msg, tbFlag=tbFlag)
         self.nodename = nodename
         self.uri = uri
@@ -330,7 +330,7 @@
 
 class NameError(ReclassException):
 
-    def __init__(self, msg, rc=posix.EX_DATAERR):
+    def __init__(self, msg=None, rc=posix.EX_DATAERR):
         super(NameError, self).__init__(rc=rc, msg=msg)
 
 
diff --git a/reclass/storage/yaml_git/__init__.py b/reclass/storage/yaml_git/__init__.py
index d9c84cd..1053a95 100644
--- a/reclass/storage/yaml_git/__init__.py
+++ b/reclass/storage/yaml_git/__init__.py
@@ -218,7 +218,7 @@
                     if callable(self._class_name_mangler):
                         relpath, name = self._class_name_mangler(relpath, name)
                     if name in ret:
-                        raise reclass.errors.DuplicateNodeNameError(self.name + ' - ' + bname, name, ret[name], path)
+                        raise reclass.errors.DuplicateNodeNameError(self.url + ' - ' + bname, name, ret[name], file)
                     else:
                         branch[name] = file
             ret[bname] = branch
@@ -233,7 +233,7 @@
                 if callable(self._node_name_mangler):
                     relpath, node_name = self._node_name_mangler(relpath, node_name)
                 if node_name in ret:
-                    raise reclass.errors.DuplicateNodeNameError(self.name, name, files[name], path)
+                    raise reclass.errors.DuplicateNodeNameError(self.url, name, ret[node_name].path, file.path)
                 else:
                     ret[node_name] = file
         return ret