From 727cc3e32424886b90df2094063549189cbbb390 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 7 May 2015 14:16:49 +0900 Subject: [PATCH] sync: Improve error message when writing smart sync manifest fails The error message only states that writing the manifest failed. Include the exception message, so it's easier to track down the reason that the write failed. Change-Id: I06e942c48a19521ba45292199519dd0a8bdb1de7 --- subcmds/sync.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subcmds/sync.py b/subcmds/sync.py index b4546c15..c9ca8897 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -592,8 +592,9 @@ later is required to fix a server side protocol bug. f.write(manifest_str) finally: f.close() - except IOError: - print('error: cannot write manifest to %s' % manifest_path, + except IOError as e: + print('error: cannot write manifest to %s:\n%s' + % (manifest_path, e), file=sys.stderr) sys.exit(1) self._ReloadManifest(manifest_name)