1 |
commit: c86270de6ab77366d1bf354f569d2d7d636ca407 |
2 |
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Gentoo <DOT> Org> |
3 |
AuthorDate: Wed Mar 30 15:03:22 2011 +0000 |
4 |
Commit: Arfrever Frehtes Taifersar Arahesis <arfrever <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 30 15:03:22 2011 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c86270de |
7 |
|
8 |
Use os.path.expanduser() to simplify code. |
9 |
|
10 |
--- |
11 |
bin/repoman | 5 +---- |
12 |
1 files changed, 1 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/bin/repoman b/bin/repoman |
15 |
index 1136068..d48b9d1 100755 |
16 |
--- a/bin/repoman |
17 |
+++ b/bin/repoman |
18 |
@@ -2427,10 +2427,7 @@ else: |
19 |
logging.info("Automatically setting PORTAGE_GPG_DIR to %s" % repoman_settings["PORTAGE_GPG_DIR"]) |
20 |
else: |
21 |
raise portage.exception.MissingParameter("PORTAGE_GPG_DIR is unset!") |
22 |
- gpg_dir = repoman_settings["PORTAGE_GPG_DIR"] |
23 |
- if gpg_dir.startswith("~") and "HOME" in os.environ: |
24 |
- repoman_settings["PORTAGE_GPG_DIR"] = os.path.join( |
25 |
- os.environ["HOME"], gpg_dir[1:].lstrip(os.path.sep)) |
26 |
+ repoman_settings["PORTAGE_GPG_DIR"] = os.path.expanduser(repoman_settings["PORTAGE_GPG_DIR"]) |
27 |
if not os.access(repoman_settings["PORTAGE_GPG_DIR"], os.X_OK): |
28 |
raise portage.exception.InvalidLocation( |
29 |
"Unable to access directory: PORTAGE_GPG_DIR='%s'" % \ |