public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Cc: Zac Medico <zmedico@gentoo.org>
Subject: [gentoo-portage-dev] [PATCH v2] dispatch_conf: use portage.os, shutil unicode wrappers (bug 545270)
Date: Wed,  1 Apr 2015 15:43:28 -0700	[thread overview]
Message-ID: <1427928208-30192-1-git-send-email-zmedico@gentoo.org> (raw)
In-Reply-To: <1427927311-29602-1-git-send-email-zmedico@gentoo.org>

This avoids UnicodeDecodeError problems by using UTF-8 encoding
regardless of the locale.

X-Gentoo-Bug: 545270
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545270
---
[PATCH v2] adds portage.shutil to the imports

 pym/portage/dispatch_conf.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py
index 790eacb..98939fd 100644
--- a/pym/portage/dispatch_conf.py
+++ b/pym/portage/dispatch_conf.py
@@ -10,15 +10,13 @@ from __future__ import print_function, unicode_literals
 
 import io
 import functools
-import os
-import shutil
 import stat
 import subprocess
 import sys
 import tempfile
 
 import portage
-from portage import _encodings
+from portage import _encodings, os, shutil
 from portage.env.loaders import KeyValuePairFileLoader
 from portage.localization import _
 from portage.util import shlex_split, varexpand
-- 
2.3.1



  reply	other threads:[~2015-04-01 22:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-01 22:28 [gentoo-portage-dev] [PATCH] dispatch_conf: use portage.os unicode wrapper (bug 545270) Zac Medico
2015-04-01 22:43 ` Zac Medico [this message]
2015-04-01 23:17 ` [gentoo-portage-dev] [PATCH v3] dispatch-conf: fix unicode handling " Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427928208-30192-1-git-send-email-zmedico@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox