summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org>2011-03-30 17:03:22 +0200
committerZac Medico <zmedico@gentoo.org>2011-04-13 00:40:21 -0700
commit0fcb4e236b32ebe687a9807e4a4e65835d19ea31 (patch)
tree67bff5bb63e8b8da785deda5ea686d596a80b547 /bin
parente988ead0427787a40f2e9b0c4827d67b876bbda4 (diff)
downloadportage-0fcb4e236b32ebe687a9807e4a4e65835d19ea31.tar.gz
portage-0fcb4e236b32ebe687a9807e4a4e65835d19ea31.tar.bz2
portage-0fcb4e236b32ebe687a9807e4a4e65835d19ea31.zip
Use os.path.expanduser() to simplify code.
Diffstat (limited to 'bin')
-rwxr-xr-xbin/repoman5
1 files changed, 1 insertions, 4 deletions
diff --git a/bin/repoman b/bin/repoman
index 8b1efc5a3..86eba81e4 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -2426,10 +2426,7 @@ else:
logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"])
else:
raise portage.exception.MissingParameter("PORTAGE_GPG_DIR is unset!")
- gpg_dir = repoman_settings["PORTAGE_GPG_DIR"]
- if gpg_dir.startswith("~") and "HOME" in os.environ:
- repoman_settings["PORTAGE_GPG_DIR"] = os.path.join(
- os.environ["HOME"], gpg_dir[1:].lstrip(os.path.sep))
+ repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"])
if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK):
raise portage.exception.InvalidLocation(
"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \