diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2011-03-30 22:32:45 +0200 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2011-03-30 22:32:45 +0200 |
commit | 54e35da1a38b1e3c94afc36f10edd97b999083db (patch) | |
tree | 9d44ff2457550e90709ea3b8ec9bf53bfba4a4f0 | |
parent | c133281d9b906f45bf4525dbc08faaeb605c1092 (diff) | |
download | portage-54e35da1a38b1e3c94afc36f10edd97b999083db.tar.gz portage-54e35da1a38b1e3c94afc36f10edd97b999083db.tar.bz2 portage-54e35da1a38b1e3c94afc36f10edd97b999083db.zip |
Simplify calculation of repoman_settings["PORTAGE_GPG_DIR"] in gpgsign().
os.path.expanduser() works even when HOME environment variable is not set.
-rwxr-xr-x | bin/repoman | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/bin/repoman b/bin/repoman index d48b9d13e..985b8ea48 100755 --- a/bin/repoman +++ b/bin/repoman @@ -2422,11 +2422,8 @@ else: if "PORTAGE_GPG_KEY" not in repoman_settings: raise portage.exception.MissingParameter("PORTAGE_GPG_KEY is unset!") if "PORTAGE_GPG_DIR" not in repoman_settings: - if "HOME" in os.environ: - repoman_settings["PORTAGE_GPG_DIR"] = os.path.join(os.environ["HOME"], ".gnupg") - logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"]) - else: - raise portage.exception.MissingParameter("PORTAGE_GPG_DIR is unset!") + repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser("~/.gnupg") + logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"]) 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( |