File tree Expand file tree Collapse file tree 5 files changed +10
-5
lines changed Expand file tree Collapse file tree 5 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,8 @@ def add_nodes_to_etc_hosts():
237
237
# Import host-ip mapping defined in etc-hosts file
238
238
count = etc_hosts .import_file (ETC_HOSTS_FILE )
239
239
# Print results
240
- print ('*** Added %s entries to /etc/hosts\n ' % count ['write_result' ]['total_written' ])
240
+ count = count ['add_result' ]['ipv6_count' ] + count ['add_result' ]['ipv4_count' ]
241
+ print ('*** Added %s entries to /etc/hosts\n ' % count )
241
242
242
243
243
244
def remove_nodes_from_etc_hosts (net ):
Original file line number Diff line number Diff line change @@ -287,7 +287,8 @@ def add_nodes_to_etc_hosts():
287
287
# Import host-ip mapping defined in etc-hosts file
288
288
count = etc_hosts .import_file (ETC_HOSTS_FILE )
289
289
# Print results
290
- print ('*** Added %s entries to /etc/hosts\n ' % count ['write_result' ]['total_written' ])
290
+ count = count ['add_result' ]['ipv6_count' ] + count ['add_result' ]['ipv4_count' ]
291
+ print ('*** Added %s entries to /etc/hosts\n ' % count )
291
292
292
293
293
294
def remove_nodes_from_etc_hosts (net ):
Original file line number Diff line number Diff line change @@ -287,7 +287,8 @@ def add_nodes_to_etc_hosts():
287
287
# Import host-ip mapping defined in etc-hosts file
288
288
count = etc_hosts .import_file (ETC_HOSTS_FILE )
289
289
# Print results
290
- print ('*** Added %s entries to /etc/hosts\n ' % count ['write_result' ]['total_written' ])
290
+ count = count ['add_result' ]['ipv6_count' ] + count ['add_result' ]['ipv4_count' ]
291
+ print ('*** Added %s entries to /etc/hosts\n ' % count )
291
292
292
293
293
294
def remove_nodes_from_etc_hosts (net ):
Original file line number Diff line number Diff line change @@ -208,7 +208,8 @@ def add_nodes_to_etc_hosts():
208
208
# Import host-ip mapping defined in etc-hosts file
209
209
count = etc_hosts .import_file (ETC_HOSTS_FILE )
210
210
# Print results
211
- print ('*** Added %s entries to /etc/hosts\n ' % count ['write_result' ]['total_written' ])
211
+ count = count ['add_result' ]['ipv6_count' ] + count ['add_result' ]['ipv4_count' ]
212
+ print ('*** Added %s entries to /etc/hosts\n ' % count )
212
213
213
214
214
215
def remove_nodes_from_etc_hosts (net ):
Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ def add_nodes_to_etc_hosts():
198
198
# Import host-ip mapping defined in etc-hosts file
199
199
count = etc_hosts .import_file (ETC_HOSTS_FILE )
200
200
# Print results
201
- print ('*** Added %s entries to /etc/hosts\n ' % count ['write_result' ]['total_written' ])
201
+ count = count ['add_result' ]['ipv6_count' ] + count ['add_result' ]['ipv4_count' ]
202
+ print ('*** Added %s entries to /etc/hosts\n ' % count )
202
203
203
204
204
205
def remove_nodes_from_etc_hosts (net ):
You can’t perform that action at this time.
0 commit comments