Removed an error in the paths module
This commit is contained in:
parent
23ecd43fc0
commit
a8bebc2808
@ -1,9 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
import logger
|
||||||
import sys
|
import sys
|
||||||
import fixes
|
import fixes
|
||||||
if hasattr(sys, "frozen"):
|
if hasattr(sys, "frozen"):
|
||||||
fixes.setup()
|
fixes.setup()
|
||||||
import logger
|
|
||||||
import platform
|
import platform
|
||||||
import languageHandler
|
import languageHandler
|
||||||
import widgetUtils
|
import widgetUtils
|
||||||
|
10
src/paths.py
10
src/paths.py
@ -2,7 +2,7 @@
|
|||||||
import platform
|
import platform
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import logging
|
#import logging
|
||||||
from platform_utils import paths as paths_
|
from platform_utils import paths as paths_
|
||||||
|
|
||||||
from functools import wraps
|
from functools import wraps
|
||||||
@ -10,7 +10,7 @@ from functools import wraps
|
|||||||
mode = "portable"
|
mode = "portable"
|
||||||
directory = None
|
directory = None
|
||||||
|
|
||||||
log = logging.getLogger("paths")
|
#log = logging.getLogger("paths")
|
||||||
|
|
||||||
def merge_paths(func):
|
def merge_paths(func):
|
||||||
@wraps(func)
|
@wraps(func)
|
||||||
@ -31,7 +31,7 @@ def config_path():
|
|||||||
elif mode == "installed":
|
elif mode == "installed":
|
||||||
path = data_path("config")
|
path = data_path("config")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
log.debug("%s path does not exist, creating..." % (path,))
|
# log.debug("%s path does not exist, creating..." % (path,))
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ def logs_path():
|
|||||||
elif mode == "installed":
|
elif mode == "installed":
|
||||||
path = data_path("logs")
|
path = data_path("logs")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
log.debug("%s path does not exist, creating..." % (path,))
|
# log.debug("%s path does not exist, creating..." % (path,))
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
return path
|
return path
|
||||||
|
|
||||||
@ -75,6 +75,6 @@ def com_path():
|
|||||||
elif mode == "installed":
|
elif mode == "installed":
|
||||||
path = data_path(u"com_cache")
|
path = data_path(u"com_cache")
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
log.debug("%s path does not exist, creating..." % (path,))
|
# log.debug("%s path does not exist, creating..." % (path,))
|
||||||
os.mkdir(path)
|
os.mkdir(path)
|
||||||
return path
|
return path
|
||||||
|
Loading…
Reference in New Issue
Block a user