Add import wirecurly.exc in condition. ExceptionBase extends BaseException not object