#!/usr/bin/env python

import sys
import traceback
from desthumbs import makeDESthumbslib

if __name__ == "__main__":
    # Get the command-line arguments
    args = makeDESthumbslib.cmdline()
    # Run the maker
    try:
        makeDESthumbslib.run(args)
    except:
        (type, value, my_traceback) = sys.exc_info()
        string_trace = traceback.format_exception(type,value,my_traceback)
        # write string into log
        for line in string_trace:
            args.sout.write(line) 

        # Finally raise
        raise

