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

« back to all changes in this revision

Viewing changes to bin/ivle-listusers

  • Committer: Matt Giuca
  • Date: 2009-02-25 10:05:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1119.
  • Revision ID: matt.giuca@gmail.com-20090225100526-c93kqtmjiqy65p2n
tutorial.css: Styled the H1 inside the page to look like a regular h1, not our
    special golden h1 (which doesn't work except at the top of the page).

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
import os
28
28
import getopt
29
29
 
30
 
import ivle.db
 
30
import ivle.database
31
31
 
32
32
# Options processing
33
33
def usage():
56
56
    print "Must run listusers.py as root."
57
57
    sys.exit()
58
58
 
59
 
try:
60
 
    db = ivle.db.DB()
61
 
    list = db.get_users()
62
 
except Exception, message:
63
 
    print "Error: " + str(message)
64
 
    sys.exit(1)
 
59
store = ivle.database.get_store()
 
60
users = store.find(ivle.database.User).order_by(ivle.database.User.login)
65
61
 
66
 
list.sort(key=lambda user: user.login)
67
 
for user in list:
 
62
for user in users:
68
63
    if justnames:
69
64
        print user.login
70
65
    else: