kopia lustrzana https://github.com/jupyterhub/repo2docker
Use getpass instead of pwd to fetch username
getpass is available onn windows as well as unix, whereas pwd is not available on windows.pull/683/head
rodzic
368a64018d
commit
02ec2255d6
|
@ -7,13 +7,12 @@ Usage:
|
|||
|
||||
python -m repo2docker https://github.com/you/your-repo
|
||||
"""
|
||||
import argparse
|
||||
import errno
|
||||
import json
|
||||
import sys
|
||||
import logging
|
||||
import os
|
||||
import pwd
|
||||
import getpass
|
||||
import shutil
|
||||
import tempfile
|
||||
import time
|
||||
|
@ -213,7 +212,7 @@ class Repo2Docker(Application):
|
|||
"""
|
||||
Default user_name to current running user.
|
||||
"""
|
||||
return pwd.getpwuid(os.getuid()).pw_name
|
||||
return getpass.getuser()
|
||||
|
||||
appendix = Unicode(
|
||||
config=True,
|
||||
|
|
Ładowanie…
Reference in New Issue