#NEWLINE# def handle_error( result ) : #NEWLINE# #INDENT# '\n    Extracts the last Windows error message into a python unicode string\n\n    :param result:\n        A function result, 0 or None indicates failure\n\n    :return:\n        A unicode string error message\n    ' #NEWLINE# if result : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# ( _ , error_string ) = get_error ( ) #NEWLINE# if ( not isinstance ( error_string , str_cls ) ) : #NEWLINE# #INDENT# error_string = _try_decode ( result ) #NEWLINE# #UNINDENT# raise OSError ( error_string )