diff options
Diffstat (limited to 'scripts/lib/devtool/upgrade.py')
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 967d157077..6c4a62b558 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py | |||
@@ -125,11 +125,8 @@ def _write_append(rc, srctreebase, srctree, same_dir, no_same_dir, rev, copied, | |||
125 | return af | 125 | return af |
126 | 126 | ||
127 | def _cleanup_on_error(rd, srctree): | 127 | def _cleanup_on_error(rd, srctree): |
128 | rdp = os.path.split(rd)[0] # recipes folder | ||
129 | if os.path.exists(rd): | 128 | if os.path.exists(rd): |
130 | shutil.rmtree(rd) | 129 | shutil.rmtree(rd) |
131 | if not len(os.listdir(rdp)): | ||
132 | os.rmdir(rdp) | ||
133 | srctree = os.path.abspath(srctree) | 130 | srctree = os.path.abspath(srctree) |
134 | if os.path.exists(srctree): | 131 | if os.path.exists(srctree): |
135 | shutil.rmtree(srctree) | 132 | shutil.rmtree(srctree) |