2
0
mirror of https://github.com/mhinz/neovim-remote synced 2024-11-11 13:10:34 +00:00

Make main() take optional environment

This commit is contained in:
Marco Hinz 2017-05-24 20:40:40 +02:00
parent aee0fa049c
commit 39519a7b00
No known key found for this signature in database
GPG Key ID: 1C980A1B657B4A4F

View File

@ -298,9 +298,9 @@ def print_sockaddrs():
print(addr)
def main(argv = sys.argv):
def main(argv=sys.argv, env=os.environ):
flags, arguments = parse_args(argv)
address = os.environ.get('NVIM_LISTEN_ADDRESS')
address = env.get('NVIM_LISTEN_ADDRESS')
if flags.servername:
address = flags.servername