diff options
Diffstat (limited to 'subcmds/init.py')
-rw-r--r-- | subcmds/init.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/subcmds/init.py b/subcmds/init.py index 17edfa05..37910843 100644 --- a/subcmds/init.py +++ b/subcmds/init.py | |||
@@ -14,6 +14,7 @@ | |||
14 | # limitations under the License. | 14 | # limitations under the License. |
15 | 15 | ||
16 | import os | 16 | import os |
17 | import shutil | ||
17 | import sys | 18 | import sys |
18 | 19 | ||
19 | from color import Coloring | 20 | from color import Coloring |
@@ -137,6 +138,11 @@ to update the working directory files. | |||
137 | if not m.Sync_NetworkHalf(): | 138 | if not m.Sync_NetworkHalf(): |
138 | r = m.GetRemote(m.remote.name) | 139 | r = m.GetRemote(m.remote.name) |
139 | print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url | 140 | print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url |
141 | |||
142 | # Better delete the manifest git dir if we created it; otherwise next | ||
143 | # time (when user fixes problems) we won't go through the "is_new" logic. | ||
144 | if is_new: | ||
145 | shutil.rmtree(m.gitdir) | ||
140 | sys.exit(1) | 146 | sys.exit(1) |
141 | 147 | ||
142 | syncbuf = SyncBuffer(m.config) | 148 | syncbuf = SyncBuffer(m.config) |