#!/bin/env python

import argparse
import collections
import pprint
import pickle
import os
import re
import cbor
import logging


logr = logging.getLogger( __name__ )


# Exception type is part of the error signature
err_type_re_signature = { 
    "<type 'exceptions.OSError'>": re.compile( '([^:]+):?' ),
    "<type 'exceptions.IOError'>": re.compile( '([^:]+):?' ),
    "<class 'runcmd.Run_Cmd_Error'>": 
        re.compile( '<Run_Cmd_Error \((code=.+msg=[^:/]+).*:(.+)\n' ),