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

« back to all changes in this revision

Viewing changes to bin/ivle-remakeuser

  • Committer: Matt Giuca
  • Date: 2010-02-18 08:33:51 UTC
  • Revision ID: matt.giuca@gmail.com-20100218083351-l6be6fpe244u2x4c
svnlogservice: utf-8 decoding of the relevant parts of the dictionary, so they are put into JSON as unicode strings, not UTF-8 strings which are decoded wrongly. svnlog now displays unicode characters correctly. This is the final fix in Launchpad Bug #523495 -- all Subversion filename issues fixed (except the crash on log and diff directly on a non-ASCII filename, covered by bug #523500).

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)