[svn r63232] nicer repr for gateway._rinfo() informatio about remote location
--HG-- branch : trunk
This commit is contained in:
parent
41d20e26aa
commit
82630c37a8
|
@ -247,6 +247,10 @@ class Gateway(object):
|
||||||
class RInfo:
|
class RInfo:
|
||||||
def __init__(self, **kwargs):
|
def __init__(self, **kwargs):
|
||||||
self.__dict__.update(kwargs)
|
self.__dict__.update(kwargs)
|
||||||
|
def __repr__(self):
|
||||||
|
info = ", ".join(["%s=%s" % item
|
||||||
|
for item in self.__dict__.items()])
|
||||||
|
return "<RInfo %r>" % info
|
||||||
self._cache_rinfo = RInfo(**self.remote_exec("""
|
self._cache_rinfo = RInfo(**self.remote_exec("""
|
||||||
import sys, os
|
import sys, os
|
||||||
channel.send(dict(
|
channel.send(dict(
|
||||||
|
|
|
@ -446,6 +446,8 @@ class BasicRemoteExecution:
|
||||||
assert rinfo.executable
|
assert rinfo.executable
|
||||||
assert rinfo.cwd
|
assert rinfo.cwd
|
||||||
assert rinfo.version_info
|
assert rinfo.version_info
|
||||||
|
s = repr(rinfo)
|
||||||
|
assert s.find(rinfo.cwd) != -1
|
||||||
old = self.gw.remote_exec("""
|
old = self.gw.remote_exec("""
|
||||||
import os.path
|
import os.path
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
|
|
Loading…
Reference in New Issue