Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def on_tvSMBBrowser_row_expanded (self, view, iter, path):
"""Handler for expanding a row in the SMB tree view."""
model = view.get_model ()
entry = model.get_value (iter, 0)
if entry == None:
return
if entry.smbc_type == pysmb.smbc.WORKGROUP:
# Workgroup
# Be careful though: if there is a server with the
# same name as the workgroup we will get a list of its
# shares, not the workgroup's servers.
try:
if self.expanding_row:
return
except:
self.expanding_row = 1
busy (self.SMBBrowseDialog)
uri = "smb://%s/" % entry.name
debug = 0
if get_debugging ():
debug = 10
smbc_auth = pysmb.AuthContext (self.SMBBrowseDialog)