Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: gerrit_util.py

Issue 1471973004: Fix some path processing to work better on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: lint Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gcl.py ('k') | repo » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gerrit_util.py
diff --git a/gerrit_util.py b/gerrit_util.py
index bafd60a178acb0860ffb763237feb7df3208feff..38ac6aa2fd958bcc31b95d6fc79760593e0e58c2 100755
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -97,7 +97,7 @@ class NetrcAuthenticator(Authenticator):
@staticmethod
def _get_netrc():
path = '_netrc' if sys.platform.startswith('win') else '.netrc'
- path = os.path.join(os.environ['HOME'], path)
+ path = os.path.expanduser(os.path.join('~', path))
try:
return netrc.netrc(path)
except IOError:
« no previous file with comments | « gcl.py ('k') | repo » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698