Source

aurum / python / aurum / auutils.py

Diff from to

File python/aurum/auutils.py

 echoe=lambda o, colinfo: pyecho(o, True )
 echom=lambda o, colinfo: pyecho(o, False)
 
-def get_repo_prop_gen(repo_props):
+def get_repo_prop_gen(repo_props, pathattr='path'):
     def get_repo_prop(repo, prop):
         if prop in repo_props:
             r=repo_props[prop](repo)
             if r is None:
-                vim_throw('failcfg', prop, repo.path)
+                vim_throw('failcfg', prop, getattr(repo, pathattr))
             else:
                 return {prop : r}
         else:
-            vim_throw('nocfg', repo.path, prop)
+            vim_throw('nocfg', getattr(repo, pathattr), prop)
     return get_repo_prop
 
 def get_one_prop(_get_repo_prop, path, prop):