Remove duplicate call to cleanup().
[cdist.git] / cdist
diff --git a/cdist b/cdist
index 87db25ab2fdb0daff77a53d6cd9fd0aa3a99bf11..cdc6acf6280cc24c853eb895357245d437113c91 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -103,7 +103,7 @@ class BoolOption(object):
 
     def offer(self, key, value):
         if key == self.key:
-            self.value = (value == 'yes' or value == '1' or value == 'true')
+            self.value = value in ['yes', '1', 'true']
 
 class Config:
     def __init__(self):
@@ -1267,9 +1267,6 @@ def main():
             if target is not None and not args.keep:
                 target.cleanup()
 
-        if target is not None and not args.keep:
-            target.cleanup()
-
     elif args.command == 'release':
         if args.minor is False and args.micro is False:
             raise Error('you must specify --minor or --micro')