summaryrefslogtreecommitdiffstats
path: root/project.py
diff options
context:
space:
mode:
authorDan Sandler <dsandler@android.com>2014-03-09 13:20:02 -0400
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2014-03-11 05:33:43 +0000
commit53e902a19b0b80e07ac55966d13c5c84c5b0e8ce (patch)
treee804b3826be8d5bb6153f2f9f4e482191e8b8642 /project.py
parent093fdb6587bba081c4d34eb9ea500149b1090280 (diff)
downloadgit-repo-53e902a19b0b80e07ac55966d13c5c84c5b0e8ce.tar.gz
More verbose errors for NoManifestExceptions.
The old "manifest required for this command -- please run init" is replaced by a more helpful message that lists the command repo was trying to execute (with arguments) as well as the str() of the NoManifestException. For example: > error: in `sync`: [Errno 2] No such file or directory: > 'path/to/.repo/manifests/.git/HEAD' > error: manifest missing or unreadable -- please run init Other failure points in basic command parsing and dispatch are more clearly explained in the same fashion. Change-Id: I6212e5c648bc5d57e27145d55a5391ca565e4149
Diffstat (limited to 'project.py')
-rw-r--r--project.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/project.py b/project.py
index d07b5216..023cf732 100644
--- a/project.py
+++ b/project.py
@@ -2327,8 +2327,8 @@ class Project(object):
2327 path = os.path.join(self._project.worktree, '.git', HEAD) 2327 path = os.path.join(self._project.worktree, '.git', HEAD)
2328 try: 2328 try:
2329 fd = open(path, 'rb') 2329 fd = open(path, 'rb')
2330 except IOError: 2330 except IOError as e:
2331 raise NoManifestException(path) 2331 raise NoManifestException(path, str(e))
2332 try: 2332 try:
2333 line = fd.read() 2333 line = fd.read()
2334 finally: 2334 finally: