diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2011-03-30 17:03:22 +0200 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2011-03-30 17:03:22 +0200 |
commit | c86270de6ab77366d1bf354f569d2d7d636ca407 (patch) | |
tree | 742d9fea59b44be1db701fa6d623253180fbf233 | |
parent | 1d6e6b2fe3b0107153b76dfe84ef8b2dc8240658 (diff) | |
download | portage-c86270de6ab77366d1bf354f569d2d7d636ca407.tar.gz portage-c86270de6ab77366d1bf354f569d2d7d636ca407.tar.bz2 portage-c86270de6ab77366d1bf354f569d2d7d636ca407.zip |
Use os.path.expanduser() to simplify code.
-rwxr-xr-x | bin/repoman | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bin/repoman b/bin/repoman index 11360683e..d48b9d13e 100755 --- a/bin/repoman +++ b/bin/repoman @@ -2427,10 +2427,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'" % \ |