How to catch login using PySVN?

I am new to Python and PySVN in general, and I am trying to export the SVN repository using pysvn. Here is my code:

#set up svn login data  
def svn_credentials (realm, username, may_save):  
  return True, svn_login_name, svn_login_password, False

#establish connection  
svn_client = pysvn.Client ()  
svn_client.callback_get_login = svn_credentials

#export data  
svn_client.export('server-path-goes-here', 'client-path-goes-here', force=True)

Which works fine, but if the password is incorrect or the username is unknown, this code just sits. I believe that he was presented with a user login invitation on the SVN side, but I don’t understand how to check what happens with callback_get_login. Any help would be greatly appreciated.

+5
source share
2 answers

, pysvn , - , , , .

script , , , set_default_username set_default_password pysvn.Client.

, pysvn , , , .

+4

All Articles