'read' to split on newlines, it's safe to use newlines as delimiters in
the log file since 'read' is guaranteed to split any newlines contained
in the arguments.
svn path=/main/trunk/; revision=11601
return 1
;;
esac
- # Note: Even though the message is split on $'\n' here, it's still
- # not entirely safe to use it as a delimiter in the log file since
- # there can still be escaped newlines that will be expanded due to
- # the echo -e parameter.
echo -e "$@" | while read line ; do
- echo -ne "${messagetype} ${line}\n\0" >> \
+ echo "${messagetype} ${line}" >> \
"${T}/logging/${EBUILD_PHASE:-other}"
done
return 0
logentries[msgfunction] = []
lastmsgtype = None
msgcontent = []
- for l in open(filename, "r").read().split("\0"):
+ for l in open(filename, "rb"):
if not l:
continue
try: