mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Improve error message when syncing a project with invalid groups.
Change-Id: Iaf5c2a0f00667dc09bcf455cfe2f39bfbaa2bfc0
This commit is contained in:
parent
185307d1dd
commit
87ea5913f2
7
main.py
7
main.py
@ -45,6 +45,7 @@ from command import MirrorSafeCommand
|
|||||||
from subcmds.version import Version
|
from subcmds.version import Version
|
||||||
from editor import Editor
|
from editor import Editor
|
||||||
from error import DownloadError
|
from error import DownloadError
|
||||||
|
from error import InvalidProjectGroupsError
|
||||||
from error import ManifestInvalidRevisionError
|
from error import ManifestInvalidRevisionError
|
||||||
from error import ManifestParseError
|
from error import ManifestParseError
|
||||||
from error import NoManifestException
|
from error import NoManifestException
|
||||||
@ -173,6 +174,12 @@ class _Repo(object):
|
|||||||
else:
|
else:
|
||||||
print('error: no project in current directory', file=sys.stderr)
|
print('error: no project in current directory', file=sys.stderr)
|
||||||
result = 1
|
result = 1
|
||||||
|
except InvalidProjectGroupsError as e:
|
||||||
|
if e.name:
|
||||||
|
print('error: project group must be enabled for project %s' % e.name, file=sys.stderr)
|
||||||
|
else:
|
||||||
|
print('error: project group must be enabled for the project in the current directory', file=sys.stderr)
|
||||||
|
result = 1
|
||||||
finally:
|
finally:
|
||||||
elapsed = time.time() - start
|
elapsed = time.time() - start
|
||||||
hours, remainder = divmod(elapsed, 3600)
|
hours, remainder = divmod(elapsed, 3600)
|
||||||
|
Loading…
Reference in New Issue
Block a user