summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2015-05-07 14:16:49 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2015-07-06 16:18:06 +0900
commit727cc3e32424886b90df2094063549189cbbb390 (patch)
tree59247c708be1db7c94f8a5ba6196d9a823d96cf8
parentc5ceeb16258d5d787845840036c57f9fdfdcad34 (diff)
downloadgit-repo-727cc3e32424886b90df2094063549189cbbb390.tar.gz
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
-rw-r--r--subcmds/sync.py5
1 files 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.
592 f.write(manifest_str) 592 f.write(manifest_str)
593 finally: 593 finally:
594 f.close() 594 f.close()
595 except IOError: 595 except IOError as e:
596 print('error: cannot write manifest to %s' % manifest_path, 596 print('error: cannot write manifest to %s:\n%s'
597 % (manifest_path, e),
597 file=sys.stderr) 598 file=sys.stderr)
598 sys.exit(1) 599 sys.exit(1)
599 self._ReloadManifest(manifest_name) 600 self._ReloadManifest(manifest_name)