From 51d09cb0b24c0a3f1dd5526254e6dad4adfe11c0 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 3 Dec 2014 14:38:31 +0000 Subject: Document that GitDirectory.get_config() can raise an exception Also fix wrong indent. --- morphlib/gitdir.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/morphlib/gitdir.py b/morphlib/gitdir.py index ed71e422..4c3efbd3 100644 --- a/morphlib/gitdir.py +++ b/morphlib/gitdir.py @@ -485,11 +485,15 @@ class GitDirectory(object): self._config[key] = value def get_config(self, key): - '''Return value for a git repository configuration variable.''' + '''Return value for a git repository configuration variable. + + If the variable is unset, this will raise cliapp.AppException. + + ''' if key not in self._config: - value = morphlib.git.gitcmd(self._runcmd, 'config', '-z', key) - self._config[key] = value.rstrip('\0') + value = morphlib.git.gitcmd(self._runcmd, 'config', '-z', key) + self._config[key] = value.rstrip('\0') return self._config[key] def get_remote(self, *args, **kwargs): -- cgit v1.2.1