From c126f738bd5be581d5321521eedc9b14a8165a0e Mon Sep 17 00:00:00 2001 From: Walter Purcaro Date: Fri, 1 May 2015 18:11:25 +0200 Subject: Use 'import' instead 'from' (2) --- pyload/manager/Account.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'pyload/manager/Account.py') 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)) -- cgit v1.2.3