diff options
author | Michael Trier <mtrier@gmail.com> | 2008-07-17 17:22:01 -0400 |
---|---|---|
committer | Michael Trier <mtrier@gmail.com> | 2008-07-17 17:22:01 -0400 |
commit | c04c60f12d3684ecf961509d1b8db895e6f9aac0 (patch) | |
tree | 464108d7ba000759bb0b75523cde6d0125d1d6d8 /lib/git/cmd.py | |
parent | 564db4f20bd7189a50a12d612d56ed6391081e83 (diff) | |
download | gitpython-c04c60f12d3684ecf961509d1b8db895e6f9aac0.tar.gz |
Removed method_missing since it was only used in one place.
Diffstat (limited to 'lib/git/cmd.py')
-rw-r--r-- | lib/git/cmd.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/git/cmd.py b/lib/git/cmd.py index a6e8f6cc..38cfe3bd 100644 --- a/lib/git/cmd.py +++ b/lib/git/cmd.py @@ -8,7 +8,6 @@ import os import subprocess import re from utils import * -from method_missing import MethodMissingMixin from errors import GitCommandError # Enables debugging of GitPython's git commands @@ -17,7 +16,7 @@ GIT_PYTHON_TRACE = os.environ.get("GIT_PYTHON_TRACE", False) execute_kwargs = ('istream', 'with_keep_cwd', 'with_extended_output', 'with_exceptions', 'with_raw_output') -class Git(MethodMissingMixin): +class Git(object): """ The Git class manages communication with the Git binary """ @@ -25,6 +24,11 @@ class Git(MethodMissingMixin): super(Git, self).__init__() self.git_dir = git_dir + def __getattr__(self, name): + if name[:1] == '_': + raise AttributeError(name) + return lambda *args, **kwargs: self._call_process(name, *args, **kwargs) + @property def get_dir(self): return self.git_dir @@ -131,7 +135,7 @@ class Git(MethodMissingMixin): args.append("--%s=%s" % (dashify(k), v)) return args - def method_missing(self, method, *args, **kwargs): + def _call_process(self, method, *args, **kwargs): """ Run the given git command with the specified arguments and return the result as a String |