diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 18:11:25 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-05-01 18:11:25 +0200 |
commit | c126f738bd5be581d5321521eedc9b14a8165a0e (patch) | |
tree | 418989bfa81bfd30085f09102df53f6f58b00f14 /pyload/manager/Account.py | |
parent | Use 'import' instead 'from' (1) (diff) | |
download | pyload-c126f738bd5be581d5321521eedc9b14a8165a0e.tar.xz |
Use 'import' instead 'from' (2)
Diffstat (limited to 'pyload/manager/Account.py')
-rw-r--r-- | pyload/manager/Account.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pyload/manager/Account.py b/pyload/manager/Account.py index ac9944134..ad770a1a8 100644 --- a/pyload/manager/Account.py +++ b/pyload/manager/Account.py @@ -2,14 +2,15 @@ from __future__ import with_statement -from os.path import exists -from shutil import copy +import shutil +import threading -from threading import Lock +from os.path import exists from pyload.manager.Event import AccountUpdateEvent from pyload.utils import chmod, lock + ACC_VERSION = 1 @@ -20,7 +21,7 @@ class AccountManager(object): """Constructor""" self.core = core - self.lock = Lock() + self.lock = threading.Lock() self.initPlugins() self.saveAccounts() #: save to add categories to conf @@ -73,7 +74,7 @@ class AccountManager(object): version = content[0].split(":")[1].strip() if content else "" if not version or int(version) < ACC_VERSION: - copy("accounts.conf", "accounts.backup") + shutil.copy("accounts.conf", "accounts.backup") f.seek(0) f.write("version: " + str(ACC_VERSION)) |