U aðf&ã@s|ddlmZmZmZmZddlmZddlmZddl m Z eƒdkrXddl m Z m Z nddlm Z m Z d d gZd d „Zd S) é)Úunicode_literalsÚdivisionÚabsolute_importÚprint_functioné)Úffié)Ú _try_decode)Ústr_clsZcffi)Úkernel32Ú get_errorÚ handle_errorr cCs0|rdStƒ\}}t|tƒs$t|ƒ}t|ƒ‚dS)zÎ Extracts the last Windows error message into a python unicode string :param result: A function result, 0 or None indicates failure :return: A unicode string error message N)r Ú isinstancer r ÚOSError)ÚresultÚ_Z error_string©rúH/opt/nydus/tmp/pip-target-53d1vnqk/lib/python/oscrypto/_win/_kernel32.pyr s   N)Ú __future__rrrrÚrÚ_decoder Ú_typesr Z_kernel32_cffir r Z_kernel32_ctypesÚ__all__r rrrrÚs    þ