diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever@Gentoo.Org> | 2011-03-30 22:32:45 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-04-13 00:40:39 -0700 |
commit | 439baf280a7b927ce190c5f6fdc698731db37dfb (patch) | |
tree | ff405beda76f2860b960f19eb9723984ead78c7f | |
parent | d5172fe51828666314acee3e88a881dce02cb99f (diff) | |
download | portage-439baf280a7b927ce190c5f6fdc698731db37dfb.tar.gz portage-439baf280a7b927ce190c5f6fdc698731db37dfb.tar.bz2 portage-439baf280a7b927ce190c5f6fdc698731db37dfb.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 86eba81e4..0a480a5cc 100755 --- a/bin/repoman +++ b/bin/repoman @@ -2421,11 +2421,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( |