call the function six.reraise with 3 arguments: ImproperlyConfigured, ImproperlyConfigured(msg) and third element of return value of the function sys.exc_info.
six . reraise ( ImproperlyConfigured , ImproperlyConfigured ( msg ) , sys . exc_info ( ) [ 2 ] )