Skip to content

Commit

Permalink
Merge pull request #89 from mike-gangl/main
Browse files Browse the repository at this point in the history
Fix for broken passwords
  • Loading branch information
amfriesz authored Nov 16, 2021
2 parents 88190ed + 4c18d54 commit af615ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tutorials/04_NASA_Earthdata_Authentication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
" homeDir = os.path.expanduser(\"~\")\n",
" Popen('touch {0}{2} | echo machine {1} >> {0}{2}'.format(homeDir + os.sep, urs, netrc_name), shell=True)\n",
" Popen('echo login {} >> {}{}'.format(getpass(prompt=prompts[0]), homeDir + os.sep, netrc_name), shell=True)\n",
" Popen('echo password \\{} >> {}{}'.format(getpass(prompt=prompts[1]), homeDir + os.sep, netrc_name), shell=True)\n",
" Popen('echo \\'password {} \\'>> {}{}'.format(getpass(prompt=prompts[1]), homeDir + os.sep, netrc_name), shell=True)\n",
" # Set restrictive permissions\n",
" Popen('chmod 0600 {0}{1}'.format(homeDir + os.sep, netrc_name), shell=True)\n",
"\n",
Expand All @@ -100,7 +100,7 @@
" homeDir = os.path.expanduser(\"~\")\n",
" Popen('echo machine {1} >> {0}{2}'.format(homeDir + os.sep, urs, netrc_name), shell=True)\n",
" Popen('echo login {} >> {}{}'.format(getpass(prompt=prompts[0]), homeDir + os.sep, netrc_name), shell=True)\n",
" Popen('echo password \\{} >> {}{}'.format(getpass(prompt=prompts[1]), homeDir + os.sep, netrc_name), shell=True)"
" Popen('echo \\'password {} \\'>> {}{}'.format(getpass(prompt=prompts[1]), homeDir + os.sep, netrc_name), shell=True)"
]
},
{
Expand Down Expand Up @@ -148,7 +148,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.7.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit af615ac

Please sign in to comment.