← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1481274] Re: variable referenced before assignment error in keystone.contrib.federation.idp._sign_assertion

 

** Changed in: keystone
       Status: Fix Committed => Fix Released

** Changed in: keystone
    Milestone: None => liberty-3

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1481274

Title:
  variable referenced before assignment error in
  keystone.contrib.federation.idp._sign_assertion

Status in Keystone:
  Fix Released

Bug description:
  The _sign_assertion() function from keystone.contrib.federation.idp
  assigns file_path variable in the try block and then tries to clean up
  the file in the finally block.

  However, if fileutils.write_to_tempfile call raises then file_path is
  not assigned that results in UnboundLocalError:

        File "keystone/contrib/federation/idp.py", line 437, in _sign_assertion
          os.remove(file_path)
      UnboundLocalError: local variable 'file_path' referenced before assignment

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1481274/+subscriptions


References