Rob Shortt wrote:
> Log:
> Unicode fixes.
>
> +    print "  %s (%s): %s" % (program.channel.channel, start_time, 
> program.title.encode('latin-1'))

You don't like the logger, don't you? Using print is a bad idea in
general, it won't be in the log files if it runs as a daemon. So you
should use

| log.info('  %s (%s): %s", program.channel.channel, start_time, program.title)

As you can see, no unicode handling anymore. I "fixed" the global
logging code to auto convert string and unicode. IMHO this is a much
cleaner way.


Dischi

-- 
A much wittier reply came to mind immediately after I clicked the
'Send' button.

Attachment: pgpwv7nZFux74.pgp
Description: PGP signature

Reply via email to