Revision 69aa33fa

b/image_creator/main.py
64 64
    parser = optparse.OptionParser(version=version, usage=usage)
65 65

  
66 66
    parser.add_option("-f", "--force", dest="force", default=False,
67
        action="store_true", help="Overwrite output files if they exist")
67
        action="store_true", help="overwrite output files if they exist")
68 68

  
69 69
    parser.add_option("--no-cleanup", dest="cleanup", default=True,
70
        help="Don't cleanup sensitive data before extracting the image",
70
        help="don't cleanup sensitive data",
71 71
        action="store_false")
72 72

  
73 73
    parser.add_option("--no-sysprep", dest="sysprep", default=True,
74
        help="Don't perform system preperation before extracting the image",
74
        help="don't perform system preperation",
75 75
        action="store_false")
76 76

  
77 77
    parser.add_option("--no-shrink", dest="shrink", default=True,
78
        help="Don't shrink any partition before extracting the image",
78
        help="don't shrink any partition",
79 79
        action="store_false")
80 80

  
81 81
    parser.add_option("-o", "--outfile", type="string", dest="outfile",
82 82
        default=None, action="callback", callback=check_writable_dir,
83
        help="Output image file",
83
        help="dump image to FILE",
84 84
        metavar="FILE")
85 85

  
86 86
    parser.add_option("-u", "--upload", dest="upload", default=False,
87
        help="Upload image to a pithos repository using kamaki",
87
        help="upload the image to pithos",
88 88
        action="store_true")
89 89

  
90 90
    parser.add_option("-r", "--register", dest="register", default=False,
91
        help="Register image to okeanos using kamaki", action="store_true")
91
        help="register the image to ~okeanos", action="store_true")
92 92

  
93 93
    options, args = parser.parse_args(input_args)
94 94

  
......
115 115
        raise FatalError("You must run %s as root" \
116 116
                        % os.path.basename(sys.argv[0]))
117 117

  
118
    if not options.force:
118
    if not options.force and options.outfile is not None:
119 119
        for extension in ('', '.meta'):
120 120
            filename = "%s%s" % (options.outfile, extension)
121 121
            if os.path.exists(filename):

Also available in: Unified diff