diff options
author | 2015-05-01 18:11:25 +0200 | |
---|---|---|
committer | 2015-05-01 18:11:25 +0200 | |
commit | c126f738bd5be581d5321521eedc9b14a8165a0e (patch) | |
tree | 418989bfa81bfd30085f09102df53f6f58b00f14 /pyload/config/Parser.py | |
parent | Use 'import' instead 'from' (1) (diff) | |
download | pyload-c126f738bd5be581d5321521eedc9b14a8165a0e.tar.xz |
Use 'import' instead 'from' (2)
Diffstat (limited to 'pyload/config/Parser.py')
-rw-r--r-- | pyload/config/Parser.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/pyload/config/Parser.py b/pyload/config/Parser.py index 45fb1c8d0..d74238007 100644 --- a/pyload/config/Parser.py +++ b/pyload/config/Parser.py @@ -2,11 +2,12 @@ from __future__ import with_statement -from time import sleep +import shutil +import traceback + from os.path import exists, join -from shutil import copy +from time import sleep -from traceback import print_exc from pyload.utils import chmod, encode, decode @@ -49,7 +50,7 @@ class ConfigParser(object): """determines if config need to be copied""" try: if not exists("pyload.conf"): - copy(join(pypath, "pyload", "config", "default.conf"), "pyload.conf") + shutil.copy(join(pypath, "pyload", "config", "default.conf"), "pyload.conf") if not exists("plugin.conf"): with open("plugin.conf", "wb") as f: @@ -60,7 +61,7 @@ class ConfigParser(object): v = v[v.find(":") + 1:].strip() if not v or int(v) < CONF_VERSION: - copy(join(pypath, "pyload", "config", "default.conf"), "pyload.conf") + shutil.copy(join(pypath, "pyload", "config", "default.conf"), "pyload.conf") print "Old version of config was replaced" with open("plugin.conf", "rb") as f: @@ -95,7 +96,7 @@ class ConfigParser(object): self.updateValues(homeconf, self.config) except Exception: print "Config Warning" - print_exc() + traceback.print_exc() def parseConfig(self, config): @@ -177,7 +178,7 @@ class ConfigParser(object): except Exception, e: print "Config Warning" - print_exc() + traceback.print_exc() return conf |