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

« back to all changes in this revision

Viewing changes to lib/common/makeuser.py

  • Committer: drtomc
  • Date: 2008-02-22 04:02:23 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:542
makeuser: create svn auth for local users.

Show diffs side-by-side

added added

removed removed

Lines of Context:
260
260
    dbconn = db.DB()
261
261
    dbconn.create_user(**kwargs)
262
262
    dbconn.close()
 
263
 
 
264
    if kwargs['password']:
 
265
        if os.path.exists(conf.svn_auth_local):
 
266
            create = ""
 
267
        else:
 
268
            create = "c"
 
269
        res = os.system("htpasswd -%smb %s %s %s" % (create,
 
270
                                                     conf.svn_auth_local,
 
271
                                                     kwargs['login'],
 
272
                                                     kwargs['password']))
 
273
        if res != 0 and throw_on_error:
 
274
            raise Exception("Unable to create local-auth for %s" % kwargs['login'])
 
275