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

« back to all changes in this revision

Viewing changes to bin/ivle-remakeuser

  • Committer: David Coles
  • Date: 2010-07-28 10:52:48 UTC
  • mfrom: (1791.2.10 mediahandlers)
  • Revision ID: coles.david@gmail.com-20100728105248-zvbn9g72v1nsskvd
A series of HTML5 based media handlers using the <audio> and <video> tags.  
This replaces the previous page that just showed a download link (which is 
already available on the menu).

Also solves issue where media files were downloaded by the client twice (once 
in an AJAX request intended only for text).

Known issues:
    * Bug #588285: External BHO will not be able to play media due to not
      having IVLE cookie.
    * Bug #610745: Does not correctly preview revisions
    * Bug #610780: Ogg media does not work in Chromium

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import os
29
29
import optparse
30
30
import logging
 
31
import traceback
31
32
 
 
33
import ivle.config
32
34
import ivle.database
33
35
import ivle.makeuser
34
36
 
48
50
                          os.path.basename(sys.argv[0])
49
51
    sys.exit(1)
50
52
 
51
 
store = ivle.database.get_store()
 
53
config = ivle.config.Config()
 
54
store = ivle.database.get_store(config)
52
55
 
53
56
if options.all:
54
57
    users = store.find(ivle.database.User).order_by(ivle.database.User.login)
62
65
 
63
66
for user in users:
64
67
    try:
65
 
        ivle.makeuser.make_jail(user)
 
68
        ivle.makeuser.make_jail(user, config)
66
69
    except Exception, message:
67
 
        logging.warning(str(message))
 
70
        logging.error("Failed to recreate jail for %s.\n%s" % 
 
71
                      (user.login, traceback.format_exc()))
68
72
        continue
69
73
 
70
74
    logging.debug("recreated user %s's jail." % user.login)