* [gentoo-portage-dev] [PATCH] dispatch-conf: fix popen UnicodeDecode error (bug 576788)
@ 2016-03-14 3:18 Zac Medico
2016-03-14 10:28 ` Alexander Berntsen
0 siblings, 1 reply; 3+ messages in thread
From: Zac Medico @ 2016-03-14 3:18 UTC (permalink / raw
To: gentoo-portage-dev; +Cc: Zac Medico
X-Gentoo-Bug: 576788
X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=576788
---
bin/dispatch-conf | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 678a66d..fdf564e 100755
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@ -1,5 +1,5 @@
#!/usr/bin/python -bO
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
@@ -16,6 +16,7 @@ from __future__ import print_function, unicode_literals
import atexit
import io
import re
+import subprocess
import sys
from stat import ST_GID, ST_MODE, ST_UID
@@ -137,9 +138,15 @@ class dispatch:
path, basename = os.path.split(path)
find_opts = "-maxdepth 1"
- with os.popen(FIND_EXTANT_CONFIGS %
- (path, find_opts, basename)) as proc:
- confs += self.massage(proc.readlines())
+ try:
+ path_list = _unicode_decode(subprocess.check_output(
+ portage.util.shlex_split(FIND_EXTANT_CONFIGS %
+ (path, find_opts, basename))),
+ errors='strict').splitlines()
+ except subprocess.CalledProcessError:
+ pass
+ else:
+ confs.extend(self.massage(path_list))
if self.options['use-rcs'] == 'yes':
for rcs_util in ("rcs", "ci", "co", "rcsmerge"):
--
2.7.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] dispatch-conf: fix popen UnicodeDecode error (bug 576788)
2016-03-14 3:18 [gentoo-portage-dev] [PATCH] dispatch-conf: fix popen UnicodeDecode error (bug 576788) Zac Medico
@ 2016-03-14 10:28 ` Alexander Berntsen
2016-03-14 17:18 ` Zac Medico
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Berntsen @ 2016-03-14 10:28 UTC (permalink / raw
To: gentoo-portage-dev
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
LGTM, but remember the plan about merging repoman first.
- --
Alexander
bernalex@gentoo.org
https://secure.plaimi.net/~alexander
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCgAGBQJW5pJWAAoJENQqWdRUGk8Bk6EP/2LYCPnx+CsDAAe5I59MsVPf
yVj9zVN3AeNsPVkUThJ+FEbpZGXkEE3FYitD9EFRE3MJiVBSvDjZi4tWb39SsBXh
/N+Wy65Pg3uUEKODm8/9f1Vf72LTYWkY6xKciM1H+V6Z9UvWOt1D7+425siifeaJ
Ukkw9RgECg+cMLOejJqb6b6SNSnlK7miKpK8GwwFNUjtH11HLPjM8/XSI9fLJXU3
1QfYifwzssYKAQLCEum54HjgdQznfKyq6jB/34AFsmqLHbhyo05Efmox7efiSiTX
Cbf8gGlb2q7rstv8YlMWAV4dYWbcmBb+6HQeDb1h8S0WZBk5/3bYNKP9GPWA1g+i
nRSehATNtHc2QKQxOKPWQAPl9poVPgpJPA+MO4AVH+LpQCPjLuz8dZlXjRhW8w9p
Of1sh9gk25eQdKLCtUKPir+vaTC6E4m+lirG5aCN6xjH5CENB65AtHjNd8vCBgiB
Xcn6puWNQLCuhG3Tn9cYTmYSWiIj04tF6zr8wZn4fwSiV8Xs0xIMDwN6bgFSjy5z
c/noRm1xxTtKZ3w8TvuSmFvwkQxlT41gqPPneRd8xSK5Qtbm8MFFjVK+AQFhGOEx
lxWQv157k7f8D2wzhOH2fukkC1toubTwkaoZw1hULFOHR5inDR3m/rFRk9N3UMDM
BloEPxWwA1oSTIj05p0c
=enZC
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [gentoo-portage-dev] [PATCH] dispatch-conf: fix popen UnicodeDecode error (bug 576788)
2016-03-14 10:28 ` Alexander Berntsen
@ 2016-03-14 17:18 ` Zac Medico
0 siblings, 0 replies; 3+ messages in thread
From: Zac Medico @ 2016-03-14 17:18 UTC (permalink / raw
To: gentoo-portage-dev
On 03/14/2016 03:28 AM, Alexander Berntsen wrote:
> LGTM, but remember the plan about merging repoman first.
Okay, thanks. I'm waiting for repoman to be merged.
--
Thanks,
Zac
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-14 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-14 3:18 [gentoo-portage-dev] [PATCH] dispatch-conf: fix popen UnicodeDecode error (bug 576788) Zac Medico
2016-03-14 10:28 ` Alexander Berntsen
2016-03-14 17:18 ` Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox