Exemple #1
0
    except KeyboardInterrupt:
        raise
    except SystemExit:
        raise
    except Exception, e:
        DebugPrint(0, "Warning: Exception caught while opening tar.bz2 file: " + staging_name + ":")
        DebugPrint(0, "Caught exception: ", e)
        DebugPrintTraceback()
        return False

    try:
        for f in outfiles:

            # Reduce the size of the file name in the archive

            arcfile = f.replace(Config.getFilenameFragment(), r"")
            arcfile = arcfile.replace("..", ".")
            tar.add(os.path.join(outbox, f), arcfile)
    except KeyboardInterrupt:
        raise
    except SystemExit:
        raise
    except Exception, e:
        DebugPrint(
            0,
            "Warning: Exception caught while adding "
            + f
            + " from "
            + outbox
            + " to tar.bz2 file: "
            + staging_name
    except SystemExit:
        raise
    except Exception, e:
        DebugPrint(
            0, 'Warning: Exception caught while opening tar.bz2 file: ' +
            staging_name + ':')
        DebugPrint(0, 'Caught exception: ', e)
        DebugPrintTraceback()
        return False

    try:
        for f in outfiles:

            # Reduce the size of the file name in the archive

            arcfile = f.replace(Config.getFilenameFragment(), r'')
            arcfile = arcfile.replace('..', '.')
            tar.add(os.path.join(outbox, f), arcfile)
    except KeyboardInterrupt:
        raise
    except SystemExit:
        raise
    except Exception, e:
        DebugPrint(
            0, 'Warning: Exception caught while adding ' + f + ' from ' +
            outbox + ' to tar.bz2 file: ' + staging_name + ':')
        DebugPrint(0, 'Caught exception: ', e)
        DebugPrintTraceback()
        return False

    try: