File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -97,6 +97,15 @@ The first thing you need to do is to connect with PuppetDB:
97
97
>> > from pypuppetdb import connect
98
98
>> > db = connect()
99
99
100
+ You can also use the `with ` statement to enclose the work done on PuppetDB.
101
+ This will ensure that all HTTP connections are closed explicitly when we're
102
+ done:
103
+
104
+ .. code-block :: python
105
+
106
+ >> > with connect() as db:
107
+ >> > # ..
108
+
100
109
Nodes
101
110
-----
102
111
Original file line number Diff line number Diff line change @@ -15,6 +15,15 @@ The first thing you need to do is to connect with PuppetDB:
15
15
>> > from pypuppetdb import connect
16
16
>> > db = connect()
17
17
18
+ You can also use the `with ` statement to enclose the work done on PuppetDB.
19
+ This will ensure that all HTTP connections are closed explicitly when we're
20
+ done:
21
+
22
+ .. code-block :: python
23
+
24
+ >> > with connect() as db:
25
+ >> > # ..
26
+
18
27
Nodes
19
28
-----
20
29
You can’t perform that action at this time.
0 commit comments