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

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: mattgiuca
  • Date: 2007-12-21 00:26:23 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:112
setup.py: A few comment changes.
          Now accepts a comma-separated list of UIDs instead of just one,
            splits it, and puts them all in the array.

Show diffs side-by-side

added added

removed removed

Lines of Context:
214
214
    """Root directory where IVLE is located (in URL space):
215
215
    (eg. "/" or "/ivle")""")
216
216
    ivle_install_dir = query_user(
217
 
    'Root directory where IVLE is located (on the local file system):\n'
218
 
    '(eg. "/home/informatics/ivle")')
 
217
    'Root directory where IVLE will be installed (on the local file '
 
218
    'system):\n'
 
219
    '(eg. "/opt/ivle")')
219
220
    jail_base = query_user(
220
 
    """Root directory where user files are stored (on the local file system):
 
221
    """Root directory where the jails (containing user files) are stored
 
222
(on the local file system):
221
223
    (eg. "/home/informatics/jails")""")
222
 
    allowed_uid = query_user(
 
224
    allowed_uids = query_user(
223
225
    """UID of the web server process which will run IVLE.
224
 
Only this user may execute the trampoline. You can configure multiple users
225
 
by manually editing conf.h.
226
 
    (eg. "1002")""")
 
226
Only this user may execute the trampoline. May specify multiple users as
 
227
a comma-separated list.
 
228
    (eg. "1002,78")""")
227
229
 
228
230
    # Error handling on input values
229
231
 
230
232
    try:
231
 
        allowed_uid = int(allowed_uid)
 
233
        allowed_uids = map(int, allowed_uids.split(','))
232
234
    except ValueError:
233
 
        print >>sys.stderr, "Invalid UID (%s)." % allowed_uid
 
235
        print >>sys.stderr, (
 
236
        "Invalid UID list (%s).\n"
 
237
        "Must be a comma-separated list of integers." % allowed_uids)
234
238
        return 1
235
239
 
236
240
    # Write www/conf/conf.py
293
297
 * This list should be limited to the web server user.
294
298
 * (Note that root is an implicit member of this list).
295
299
 */
296
 
static const int allowed_uids[] = { %d };
297
 
""" % (jail_base, allowed_uid))
 
300
static const int allowed_uids[] = { %s };
 
301
""" % (jail_base, repr(allowed_uids)[1:-1]))
298
302
 
299
303
        conf.close()
300
304
    except IOError, (errno, strerror):