summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/standard.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/devtool/standard.py')
-rw-r--r--scripts/lib/devtool/standard.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index ed9e793d4a..a9c4cf8d8d 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -1229,6 +1229,17 @@ def reset(args, config, basepath, workspace):
1229 # We don't automatically create this dir next to appends, but the user can 1229 # We don't automatically create this dir next to appends, but the user can
1230 preservedir(os.path.join(config.workspace_path, 'appends', pn)) 1230 preservedir(os.path.join(config.workspace_path, 'appends', pn))
1231 1231
1232 srctree = workspace[pn]['srctree']
1233 if os.path.isdir(srctree):
1234 if os.listdir(srctree):
1235 # We don't want to risk wiping out any work in progress
1236 logger.info('Leaving source tree %s as-is; if you no '
1237 'longer need it then please delete it manually'
1238 % srctree)
1239 else:
1240 # This is unlikely, but if it's empty we can just remove it
1241 os.rmdir(srctree)
1242
1232 return 0 1243 return 0
1233 1244
1234 1245