Skip to content
  • Vladimir Mencl's avatar
    parse_institution_xml: pass write between methods · 525915ba
    Vladimir Mencl authored
    Recent changes to parse_intitution_xml (b0d86558) make log output go via write reference, conditional on verbosity settings.  However, this reference is defined in the handle method, but used in the parse_and_create method.
    
    This breaks the parse_institution_xml script, failing with:
    
      File "/djnro/edumanage/management/commands/parse_institution_xml.py", line 70, in parse_and_create
          write('Created inst %s\n' % institution_obj.pk)
      NameError: global name 'write' is not defined
    
    Fix this by explictly passing write from handle() to parse_and_create() as an additional argument.
    525915ba