summaryrefslogtreecommitdiff
path: root/cloudinit/cmd/clean.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/cmd/clean.py')
-rw-r--r--cloudinit/cmd/clean.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/cmd/clean.py b/cloudinit/cmd/clean.py
index 28ee7b84..30e49de0 100644
--- a/cloudinit/cmd/clean.py
+++ b/cloudinit/cmd/clean.py
@@ -62,8 +62,9 @@ def remove_artifacts(remove_logs, remove_seed=False):
if not os.path.isdir(init.paths.cloud_dir):
return 0 # Artifacts dir already cleaned
+ seed_path = os.path.join(init.paths.cloud_dir, 'seed')
for path in glob.glob('%s/*' % init.paths.cloud_dir):
- if path == '%s/seed' % init.paths.cloud_dir and not remove_seed:
+ if path == seed_path and not remove_seed:
continue
try:
if os.path.isdir(path) and not is_link(path):