Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use shutil.move instead of os.rename, which can't cross devices.

  • Loading branch information...
commit 899275fe4895ecb7b600547294ea25ae373d6578 1 parent bc704c3
@dripton authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 bin/set-all-slugathon-ai-passwords
View
4 bin/set-all-slugathon-ai-passwords
@@ -8,7 +8,7 @@ __license__ = "GNU GPL v2"
import argparse
import tempfile
-import os
+import shutil
from slugathon.util import prefs
@@ -24,7 +24,7 @@ def set_ai_passwords(passwd_path, password):
tmp_file.write("%s:%s\n" % (user, password))
else:
tmp_file.write(line)
- os.rename(tmp_file.name, passwd_path)
+ shutil.move(tmp_file.name, passwd_path)
def main():
Please sign in to comment.
Something went wrong with that request. Please try again.