'Base64 decode the list of files to inject.'

def _decode_files(self, injected_files):

    if (not injected_files):
        return []
    def _decode(f):
        (path, contents) = f
        try:
            decoded = base64.b64decode(contents)
            return (path, decoded)
        except (TypeError, binascii.Error):
            raise exception.Base64Exception(path=path)
    return [_decode(f) for f in injected_files]
