aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-05-13 22:29:40 -0700
committerZac Medico <zmedico@gentoo.org>2012-05-13 22:29:40 -0700
commitab387fc38d867934c5d360fa0eb311c5bdbeb95c (patch)
treef48794d2c0bb6f22c71a82e1b1a3ba1f6dd58d09 /pym/portage/dbapi/bintree.py
parentbinhost: http auth for python3 (bug #413983) (diff)
downloadportage-ab387fc38d867934c5d360fa0eb311c5bdbeb95c.tar.gz
portage-ab387fc38d867934c5d360fa0eb311c5bdbeb95c.tar.bz2
portage-ab387fc38d867934c5d360fa0eb311c5bdbeb95c.zip
Split out _hide_url_passwd() and use it more.
Diffstat (limited to 'pym/portage/dbapi/bintree.py')
-rw-r--r--pym/portage/dbapi/bintree.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 08fdad02b..51c093658 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -11,7 +11,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
'portage.output:EOutput,colorize',
'portage.locks:lockfile,unlockfile',
'portage.package.ebuild.doebuild:_vdb_use_conditional_atoms',
- 'portage.package.ebuild.fetch:_check_distfile',
+ 'portage.package.ebuild.fetch:_check_distfile,_hide_url_passwd',
'portage.update:update_dbentries',
'portage.util:atomic_ofstream,ensure_dirs,normalize_path,' + \
'writemsg,writemsg_stdout',
@@ -36,7 +36,6 @@ from portage import _unicode_encode
import codecs
import errno
import io
-import re
import stat
import subprocess
import sys
@@ -916,7 +915,7 @@ class binarytree(object):
noiselevel=-1)
except EnvironmentError as e:
writemsg(_("\n\n!!! Error fetching binhost package" \
- " info from '%s'\n") % base_url)
+ " info from '%s'\n") % _hide_url_passwd(base_url))
writemsg("!!! %s\n\n" % str(e))
del e
pkgindex = None
@@ -992,7 +991,7 @@ class binarytree(object):
writemsg_stdout("\n")
writemsg_stdout(
colorize("GOOD", _("Fetching bininfo from ")) + \
- re.sub(r'//(.+):.+@(.+)/', r'//\1:*password*@\2/', base_url) + "\n")
+ _hide_url_passwd(base_url) + "\n")
remotepkgs = portage.getbinpkg.dir_get_metadata(
base_url, chunk_size=chunk_size)