From: Catalin Marinas Date: Fri, 31 Mar 2006 17:42:34 +0000 (+0100) Subject: Remove the basedir exception throwing X-Git-Tag: v0.14.3~514 X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/commitdiff_plain/c82395b46d238948882045e76e7770319a4f40e8 Remove the basedir exception throwing This is preventing even 'clone' from working properly. Signed-off-by: Catalin Marinas --- diff --git a/stgit/basedir.py b/stgit/basedir.py index 5abe0ff..c394572 100644 --- a/stgit/basedir.py +++ b/stgit/basedir.py @@ -20,14 +20,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA import os -class BaseDirException(Exception): - pass - def __output(cmd): f = os.popen(cmd, 'r') string = f.readline().rstrip() if f.close(): - raise BaseDirException, 'Error: failed to execute "%s"' % cmd + return '' return string # GIT_DIR value cached @@ -42,6 +39,6 @@ def get(): if 'GIT_DIR' in os.environ: __base_dir = os.environ['GIT_DIR'] else: - __base_dir = __output('git-rev-parse --git-dir') + __base_dir = __output('git-rev-parse --git-dir 2> /dev/null') return __base_dir