File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -109,11 +109,11 @@ def get_nfs_shares(self, hostlist):
109
109
continue
110
110
else :
111
111
openshares .append (sharedict )
112
- for share in openshares :
113
- shares ['openshares' ].append (share ['sharename' ])
114
- for share in closedshares :
115
- shares ['closedshares' ].append (share ['sharename' ])
116
- nfsshares .append (shares )
112
+ for share in openshares :
113
+ shares ['openshares' ].append (share ['sharename' ])
114
+ for share in closedshares :
115
+ shares ['closedshares' ].append (share ['sharename' ])
116
+ nfsshares .append (shares )
117
117
return nfsshares
118
118
119
119
def get_smb_shares (self , hostlist ):
@@ -333,7 +333,7 @@ def sniff_network():
333
333
if len (hostlist_nfs ) > 0 or len (hostlist_smb ) > 0 :
334
334
if len (hostlist_nfs ) > 0 :
335
335
shares ['nfsshares' ] = sniff .get_nfs_shares (hostlist_nfs )
336
- if len (shares ['nfsshares' ]) > 0 and not args .quiet :
336
+ if isinstance ( shares [ 'nfsshares' ], list ) and len (shares ['nfsshares' ]) > 0 and not args .quiet :
337
337
print ('\n ******************************* NFS SHARES ********************************\n ' )
338
338
for host in shares ['nfsshares' ]:
339
339
print ('host: %s open: %s closed: %s' % (host ['host' ],
You can’t perform that action at this time.
0 commit comments