~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to bin/ivle-config

  • Committer: David Coles
  • Date: 2010-07-27 04:52:14 UTC
  • Revision ID: coles.david@gmail.com-20100727045214-p32h1kc0gcv48dpr
Worksheets: Strip off whitespace from the end of exercise attempts.

This solves an issue where accidental whitespace in an attempt will cause 
"IndentationError" syntax error (which don't occur when run in console).

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
    """
204
204
# The password for the usrmgt-server.""", ask=False))
205
205
 
 
206
config_options.append(ConfigOption("jail/suite", "hardy",
 
207
    """The distribution release to use to build the jail:""",
 
208
    """
 
209
# The distribution release to use to build the jail.""", ask=True))
 
210
 
 
211
config_options.append(ConfigOption("jail/mirror", "archive.ubuntu.com",
 
212
    """The archive mirror to use to build the jail:""",
 
213
    """
 
214
# The archive mirror to use to build the jail.""", ask=True))
 
215
 
 
216
config_options.append(ConfigOption("jail/devmode", False,
 
217
    """Whether jail development mode be activated:""",
 
218
    """
 
219
# Should jail development mode be activated?""", ask=False))
 
220
 
 
221
# The password for the usrmgt-server.""", ask=False))
206
222
def query_user(default, prompt):
207
223
    """Prompts the user for a string, which is read from a line of stdin.
208
224
    Exits silently if EOF is encountered. Returns the string, with spaces
282
298
    (opts, args) = getopt.gnu_getopt(args, "", optnames)
283
299
 
284
300
    if args != []:
285
 
        print >>sys.stderr, "Invalid arguments:", string.join(args, ' ')
 
301
        print >>sys.stderr, "Invalid arguments:", ' '.join(args)
286
302
        return 2
287
303
 
288
304
    if opts == []: