Sync: Improved error message when manifest server RPC call fails

When the RPC call fails, the error message returned by the server
is printed, but it is not obvious that this is caused by RPC call
failure.

Prefix the error message with a descriptive message that explains
what went wrong.

Change-Id: I4b77af22aacc2e9843c4df9d06bf54e41d9692ff
This commit is contained in:
David Pursehouse 2013-09-25 17:54:26 +09:00
parent fb99c71939
commit 351fe2c793

View File

@ -566,7 +566,8 @@ later is required to fix a server side protocol bug.
sys.exit(1)
self._ReloadManifest(manifest_name)
else:
print('error: %s' % manifest_str, file=sys.stderr)
print('error: manifest server RPC call failed: %s' %
manifest_str, file=sys.stderr)
sys.exit(1)
except (socket.error, IOError, xmlrpc.client.Fault) as e:
print('error: cannot connect to manifest server %s:\n%s'