comparison mercurial/sshserver.py @ 30635:a150173da1c1

py3: replace os.environ with encoding.environ (part 2 of 5)
author Pulkit Goyal <7895pulkit@gmail.com>
date Sun, 18 Dec 2016 01:46:39 +0530
parents b3a9ef3d30e8
children 5326e4ef1dab
comparison
equal deleted inserted replaced
30634:ad15646dc61c 30635:a150173da1c1
6 # This software may be used and distributed according to the terms of the 6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2 or any later version. 7 # GNU General Public License version 2 or any later version.
8 8
9 from __future__ import absolute_import 9 from __future__ import absolute_import
10 10
11 import os
12 import sys 11 import sys
13 12
14 from .i18n import _ 13 from .i18n import _
15 from . import ( 14 from . import (
15 encoding,
16 error, 16 error,
17 hook, 17 hook,
18 util, 18 util,
19 wireproto, 19 wireproto,
20 ) 20 )
129 self.sendresponse(r) 129 self.sendresponse(r)
130 else: self.sendresponse("") 130 else: self.sendresponse("")
131 return cmd != '' 131 return cmd != ''
132 132
133 def _client(self): 133 def _client(self):
134 client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0] 134 client = encoding.environ.get('SSH_CLIENT', '').split(' ', 1)[0]
135 return 'remote:ssh:' + client 135 return 'remote:ssh:' + client