def get_pickleable_etype(cls, loads=pickle.loads, dumps=pickle.dumps):
 try:
  loads(dumps(cls))
 except Exception:
  return Exception
 else:
  return cls

def get_pickleable_etype ( cls , loads = pickle . loads , dumps = pickle . dumps ) : try : loads ( dumps ( cls ) ) except Exception : return Exception else : return cls
get pickleable exception type .