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

« back to all changes in this revision

Viewing changes to bin/ivle-config

ivle-config now allows a blank port to be specified.

In that case, 5432 (the PostgreSQL default) is used.

Show diffs side-by-side

added added

removed removed

Lines of Context:
322
322
            or conf['database']['port'] >= 65536):
323
323
            raise ValueError()
324
324
    except ValueError:
325
 
        print >>sys.stderr, (
326
 
        "Invalid DB port (%s).\n"
327
 
        "Must be an integer between 0 and 65535." %
328
 
            repr(conf['database']['port']))
329
 
        return 1
 
325
        if conf['database']['port'] == '' or conf['database']['port'] is None:
 
326
            pass
 
327
        else:
 
328
            print >>sys.stderr, (
 
329
            "Invalid DB port (%s).\n"
 
330
            "Must be an integer between 0 and 65535." %
 
331
                repr(conf['database']['port']))
 
332
            return 1
330
333
    try:
331
334
        conf['usrmgt']['port'] = int(conf['usrmgt']['port'])
332
335
        if (conf['usrmgt']['port'] < 0 or conf['usrmgt']['port'] >= 65536):