File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -170,6 +170,10 @@ def shares(self):
170170 for share , network in zip (shares , networks ):
171171 try :
172172 mnt_info = self .mount .mnt (share , self .auth )
173+ self .logger .debug (f"Mounted { share } - { mnt_info } " )
174+ if mnt_info ["status" ] != 0 :
175+ self .logger .fail (f"Error mounting share { share } : { NFSSTAT3 [mnt_info ['status' ]]} " )
176+ continue
173177 file_handle = mnt_info ["mountinfo" ]["fhandle" ]
174178
175179 info = self .nfs3 .fsstat (file_handle , self .auth )
@@ -225,12 +229,10 @@ def enum_shares(self):
225229 try :
226230 mount_info = self .mount .mnt (share , self .auth )
227231 self .logger .debug (f"Mounted { share } - { mount_info } " )
228- if mount_info ["status" ] != 0 : # noqa: SIM102
229- if mount_info ["status" ] == 13 :
230- self .logger .fail (f"{ share } - Permission Denied" )
231- continue
232- # check for other error codes here
233-
232+ if mount_info ["status" ] != 0 :
233+ self .logger .fail (f"Error mounting share { share } : { NFSSTAT3 [mount_info ['status' ]]} " )
234+ continue
235+
234236 fhandle = mount_info ["mountinfo" ]["fhandle" ]
235237 contents = self .list_dir (fhandle , share , self .args .enum_shares )
236238
You can’t perform that action at this time.
0 commit comments