We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os.rename only works if source and destination are on the same file system which is usually not the case on properly configured *nix boxes. ;-)
os.rename
The attached patch replaces os.rename by shutil.move.
shutil.move
Index: sync_ldap_groups_to_svn_authz.py =================================================================== --- sync_ldap_groups_to_svn_authz.py (revision 26) +++ sync_ldap_groups_to_svn_authz.py (working copy) @@ -21,7 +21,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. ################################################################################ -import ConfigParser, datetime, getpass, os, re, sys, tempfile +import ConfigParser, datetime, getpass, os, re, sys, tempfile, shutil from optparse import OptionParser try: @@ -358,7 +358,7 @@ if (os.path.exists(authz_path)): os.rename(authz_path, authz_path + ".bak") - os.rename(tmp_authz_path, authz_path) + shutil.move(tmp_authz_path, authz_path) else: tmpfile = open(tmp_authz_path, 'r')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
os.rename
only works if source and destination are on the same file system which is usually not the case on properly configured *nix boxes. ;-)The attached patch replaces
os.rename
byshutil.move
.The text was updated successfully, but these errors were encountered: