On Mon, 2010-08-09 at 10:12 -0400, Seth Vidal wrote: > --- > yum/history.py | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/yum/history.py b/yum/history.py > index 502b908..66861c8 100644 > --- a/yum/history.py > +++ b/yum/history.py > @@ -610,7 +610,7 @@ class YumHistory: > # open file in append > fo = open(data_fn, 'w+') > # write data > - fo.write(data) > + fo.write(to_unicode(data)) > # flush data > fo.flush() > fo.close()
Have you tested that with random utf-8 crack in the config? ACK if you have. I'd have thought you wanted "to_utf8()" ... or to change the open() call like: fo = codes.open(data_fn, "w+", "utf-8") ...or even utf-8-sig! Personally I think the to_utf8() is probably more obvious for us mortals, but I guess the later is the best practice, or something. http://stackoverflow.com/questions/934160/write-to-utf-8-file-in-python etc. _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel