diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-05-05 17:58:24 +0000 |
---|---|---|
committer | Baserock Gerrit <gerrit@baserock.org> | 2015-05-07 14:10:28 +0000 |
commit | 42b915c2961c6fc72e08073cb98f9cbf7cb9c08a (patch) | |
tree | fa17e7dccca02f54379df60ff337f00adf1d23d3 /morphlib | |
parent | 6db8c4f9f6547f18c6e4dccca9f296cb9eb3e9d5 (diff) | |
download | morph-42b915c2961c6fc72e08073cb98f9cbf7cb9c08a.tar.gz |
Make str() of a GitDirectory return its location.
Handy for log messages.
Change-Id: I4336866c456a6225a6f3ecbfef10dfc7b864ac59
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/gitdir.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/morphlib/gitdir.py b/morphlib/gitdir.py index b80096c3..688e4b34 100644 --- a/morphlib/gitdir.py +++ b/morphlib/gitdir.py @@ -388,6 +388,9 @@ class GitDirectory(object): self._ensure_is_git_repo() + def __str__(self): + return self.dirname + def _runcmd(self, argv, **kwargs): '''Run a command at the root of the git directory. |