Преглед на файлове

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
David Pursehouse преди 10 години
родител
ревизия
727cc3e324
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      subcmds/sync.py

+ 3 - 2
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)