From: Zhang Qiang Date: Tue, 7 Feb 2012 11:26:38 +0000 (+0800) Subject: cleanup git.py X-Git-Tag: v0.2~13^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b6a4a7cd5346a5d8a15f98be59796644024b37e;p=tools%2Fgbs.git cleanup git.py --- diff --git a/gitbuildsys/git.py b/gitbuildsys/git.py index 7be5e92..04df69b 100644 --- a/gitbuildsys/git.py +++ b/gitbuildsys/git.py @@ -35,7 +35,7 @@ class Git: def _check_path(self): if os.getcwd() != self.path: - raise GitRepositoryError + raise errors.GitError("Not inside git dir") def _git_command(self, command, args=[]): """exec a git command and return the output""" @@ -50,9 +50,8 @@ class Git: def get_files(self): """return the files list""" ret, out = self._git_command('ls-files') - print self._git_command('ls-files') if ret: - raise GitRepositoryError, "Error listing files %d" % ret + raise errors.GitError("Error listing files %d" % ret) if out: return [ file for file in out.split('\n') if file ] else: