Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
self.root = root
self.expression = expression
self.host = host
self.user = user
self.port = None
self.ypath = root.ypath
self.resume = root.resume
self.no_resume = root.no_resume
self.simulate = root.simulate
self.verbose = root.verbose
self.options = {}
if os.path.exists("/etc/yaybu"):
self.options = yay.load_uri("/etc/yaybu")
self.transport = Transport(context=self,
verbose = root.verbose,
simulate = root.simulate,
env_passthrough = root.env_passthrough)
self.changelog = changes.ChangeLog(self)
self.changelog.configure_session_logging()
self.user = self.params.server.user.as_string(
default=getpass.getuser())
self.port = self.params.server.port.as_int(default=22)
self.password = self.params.server.password.as_string(default="")
self.private_key = self.params.server.private_key.as_string(default="")
root = self.root
self.ypath = root.ypath
self.resume = root.resume
self.no_resume = root.no_resume
self.simulate = root.simulate
self.verbose = root.verbose
self.options = {}
if os.path.exists("/etc/yaybu"):
self.options = yay.load_uri("/etc/yaybu")
if "://" in hostname:
parsed = urlparse.urlparse(hostname)
Transport = self.transports[parsed.scheme]
else:
Transport = self.transports["ssh"]
self.transport = Transport(
context=self,
verbose=root.verbose,
simulate=root.simulate,
)
with root.ui.throbber("Connect to '%s'" % hostname):
self.transport.connect()
self.user = self.params.server.user.as_string(default=getpass.getuser())
self.port = self.params.server.port.as_string(default=22)
self.password = self.params.server.password.as_string(default="")
self.private_key = self.params.server.private_key.as_string(default="")
root = self.root
self.ypath = root.ypath
self.resume = root.resume
self.no_resume = root.no_resume
self.simulate = root.simulate
self.verbose = root.verbose
self.changelog = root.changelog
self.options = {}
if os.path.exists("/etc/yaybu"):
self.options = yay.load_uri("/etc/yaybu")
self.transport = self.Transport(
context=self,
verbose = root.verbose,
simulate = root.simulate,
)
with root.ui.throbber("Connecting to '%s'" % hostname) as throbber:
self.transport.connect()
if not self.simulate and not self.transport.exists(self.get_data_path()):
self.transport.makedirs(self.get_data_path())
# This makes me a little sad inside, but the whole
# context thing needs a little thought before jumping in
self.state = event.EventState()