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

« back to all changes in this revision

Viewing changes to ivle/makeuser.py

  • Committer: Matt Giuca
  • Date: 2010-02-18 03:57:33 UTC
  • Revision ID: matt.giuca@gmail.com-20100218035733-d4v0iy4hq0wbjas6
ivle.fileservice_lib.listing: Previously assumed any SVN client error meant the directory was not versioned, and silently dropped SVN metadata. Now checks the error message, and for any unexpected errors, raises the exception rather than assuming unversioned. Fixes Launchpad Bug #523592.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
                    User.login,
103
103
                    User.id == Enrolment.user_id,
104
104
                    Enrolment.offering_id == offeringid,
105
 
                    Enrolment.role.is_in((u'tutor', u'lecturer'))
 
105
                    Enrolment.role.is_in((u'tutor', u'lecturer')),
 
106
                    Enrolment.active == True,
106
107
                )
107
108
            )
108
109
 
185
186
                    User.login,
186
187
                    User.id == Enrolment.user_id,
187
188
                    Enrolment.offering_id == offeringid,
188
 
                    Enrolment.role.is_in((u'tutor', u'lecturer'))
 
189
                    Enrolment.role.is_in((u'tutor', u'lecturer')),
 
190
                    Enrolment.active == True,
189
191
                )
190
192
            )
191
193
 
324
326
    # So we just write root_dir.
325
327
    conf_obj = ivle.config.Config(blank=True)
326
328
    conf_obj.filename = conf_path
 
329
    conf_obj['urls'] = {}
327
330
    conf_obj['urls']['root'] = sys_config['urls']['root']
328
331
    conf_obj['urls']['public_host'] = sys_config['urls']['public_host']
329
332
    conf_obj['urls']['svn_addr'] = sys_config['urls']['svn_addr']
 
333
    conf_obj['user_info'] = {}
330
334
    conf_obj['user_info']['login'] = username
331
335
    conf_obj['user_info']['svn_pass'] = svn_pass
332
336
    conf_obj.write()