What to do with the Connection object?
See original GitHub issueMigrating to v2, I created a Connection
object
import configparser
import os
import fabric
fabfile_config = configparser.ConfigParser()
fabfile_config.read('fabfile.cfg')
fabric.Connection(
host=fabfile_config.get('Fabric', 'Host'),
user=fabfile_config.get('Fabric', 'User'),
connect_kwargs={
'key_filename': os.path.expanduser(fabfile_config.get('Fabric', 'KeyFilename'))
}
)
but
@fabric.task(help={'command': 'The shell command to execute on the server'})
def execute(context, command = None):
if not command:
return
context.run(command)
is executing the command
locally, instead of running it on the server.
Shouldn’t the context
parameter be my connection?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (3 by maintainers)
Top Results From Across the Web
Connection Object (ADO) - Microsoft Learn
A Connection object represents a unique session with a data source. In a client/server database system, it may be equivalent to an actual ......
Read more >ADO Connection Object - W3Schools
The ADO Connection Object is used to create an open connection to a data source. Through this connection, you can access and manipulate...
Read more >Connection Object
The ADO Connection object represents a single session with an OLE DB data source. It defines a physical connection to the data source...
Read more >Connection (Java Platform SE 7 ) - Oracle Help Center
A Connection object's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this ......
Read more >Understanding Connection Object - RoseIndia.Net
The DriverManager class, attempts to locate a driver that can connect to the database represented by the string URL. Whenever the getConnection() method...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Somehow, yes. I think that I was creating the connection object incorrectly. Here is the entire code that I use, let me know if there’s something you don’t understand.
Reading through it, it appears that you have resolved this issue yourself. Please re-open if this is not the case.