def set_debug(self, new):
if type(new) is not bool:<EOL><INDENT>raise pyhsm.exception.YHSM_WrongInputType(<EOL>'<STR_LIT>', bool, type(new))<EOL><DEDENT>old = self.debug<EOL>self.debug = new<EOL>return old<EOL>
Set debug mode (boolean).

Returns old setting.