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

« back to all changes in this revision

Viewing changes to bin/ivle-config

  • Committer: David Coles
  • Date: 2009-12-09 01:14:51 UTC
  • Revision ID: coles.david@gmail.com-20091209011451-w24f3zkdubh0nl5d
Fix ivle-config's (broken) use of the depricated string module

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
# ('/usr/local' for the usual install, '/usr' for distribution packages)""",
76
76
    ask=False))
77
77
 
78
 
config_options.append(ConfigOption("paths/site_packages",
79
 
    None,
80
 
    """site-packages directory in Python, where Python libraries are to be
81
 
installed. May be left as the default, in which case the value will be
82
 
computed from prefix and the current Python version:""",
83
 
    """
84
 
# 'site-packages' directory in Python, where Python libraries are to be
85
 
# installed. May be omitted (recommended), in which case the value will be
86
 
# computed from prefix and the current Python version.""", ask=False))
87
 
 
88
78
config_options.append(ConfigOption("paths/data",
89
79
    "/var/lib/ivle",
90
80
    "In the local file system, where user-modifiable data files should be "
102
92
# In the local file system, where IVLE error logs should be located.""",
103
93
    ask=False))
104
94
 
105
 
config_options.append(ConfigOption("urls/public_host", "public.localhost",
 
95
config_options.append(ConfigOption("urls/public_host",
 
96
    "public.ivle.localhost",
106
97
    """Hostname which will cause the server to go into "public mode",
107
98
providing login-free access to student's published work:""",
108
99
    """
113
104
# Private mode (normal mode) requires login, and only serves files relevant to
114
105
# the logged-in user."""))
115
106
 
 
107
config_options.append(ConfigOption("media/version", None,
 
108
    """Version of IVLE media resources (must change on each upgrade):""",
 
109
    """
 
110
# Version string for IVLE media resource URLs. When set, they are aggressively
 
111
# cached by the browser, so it must be either left unset or changed each time
 
112
# a media file is changed.""", ask=False))
 
113
 
116
114
config_options.append(ConfigOption("database/host", "localhost",
117
115
    """PostgreSQL Database config
118
116
==========================
180
178
# other modules may be plugged in to pulldown against organisation-specific
181
179
# pulldown backends.""", ask=False))
182
180
 
183
 
config_options.append(ConfigOption("urls/svn_addr", "http://svn.localhost/",
 
181
config_options.append(ConfigOption("urls/svn_addr",
 
182
    "http://svn.ivle.localhost/",
184
183
    """Subversion config
185
184
=================
186
185
The base url for accessing subversion repositories:""",
279
278
 
280
279
    optnames = []
281
280
    for opt in config_options:
 
281
        print opt.option_name
282
282
        optnames.append(opt.option_name + "=")
283
283
    (opts, args) = getopt.gnu_getopt(args, "", optnames)
284
284
 
285
285
    if args != []:
286
 
        print >>sys.stderr, "Invalid arguments:", string.join(args, ' ')
 
286
        print >>sys.stderr, "Invalid arguments:", ' '.join(args)
287
287
        return 2
288
288
 
289
289
    if opts == []:
380
380
[ivle.webapp.tos#Plugin]
381
381
[ivle.webapp.userservice#Plugin]
382
382
[ivle.webapp.fileservice#Plugin]
 
383
[ivle.webapp.submit#Plugin]
383
384
""")
384
385
    plugindefault.close()
385
386
    print "Successfully wrote %s" % plugindefaultfile