def connectTree(self,share):
if self.getDialect() == smb.SMB_DIALECT:
# If we already have a UNC we do nothing.
if ntpath.ismount(share) is False:
# Else we build it
share = ntpath.basename(share)
share = '\\\\' + self.getRemoteHost() + '\\' + share
try:
return self._SMBConnection.connect_tree(share)
except (smb.SessionError, smb3.SessionError), e:
raise SessionError(e.get_error_code())
评论列表
文章目录