Permalink
Browse files

Using config module

  • Loading branch information...
1 parent a95403a commit 1c4335b1e38908eb77563028edd501c435d18642 @Kronuz committed Feb 9, 2013
Showing with 14 additions and 14 deletions.
  1. +14 −14 scss/tool.py
View
@@ -7,7 +7,7 @@
import sys
from collections import deque
-import scss
+from scss import config
from scss import Scss, log, spawn_rule, to_str, profiling
from scss import _prop_split_re
from scss.scss_meta import BUILD_INFO
@@ -65,34 +65,34 @@ def main():
(options, args) = parser.parse_args()
# General runtime configuration
- scss.VERBOSITY = 0
+ config.VERBOSITY = 0
if options.time:
- scss.VERBOSITY = 2
+ config.VERBOSITY = 2
if options.static_root is not None:
- scss.STATIC_ROOT = options.static_root
+ config.STATIC_ROOT = options.static_root
if options.assets_root is not None:
- scss.ASSETS_ROOT = options.assets_root
+ config.ASSETS_ROOT = options.assets_root
if options.load_paths is not None:
- # TODO: Convert global LOAD_PATHS to a list. Use it directly.
+ # TODO: Convert global config.LOAD_PATHS to a list. Use it directly.
# Doing the above will break backwards compatibility!
- if hasattr(scss.LOAD_PATHS, 'split'):
- load_path_list = [p.strip() for p in scss.LOAD_PATHS.split(',')]
+ if hasattr(config.LOAD_PATHS, 'split'):
+ load_path_list = [p.strip() for p in config.LOAD_PATHS.split(',')]
else:
- load_path_list = list(scss.LOAD_PATHS)
+ load_path_list = list(config.LOAD_PATHS)
for path_param in options.load_paths:
for p in path_param.replace(os.pathsep, ',').replace(';', ',').split(','):
p = p.strip()
if p and p not in load_path_list:
load_path_list.append(p)
- # TODO: Remove this once global LOAD_PATHS is a list.
- if hasattr(scss.LOAD_PATHS, 'split'):
- scss.LOAD_PATHS = ','.join(load_path_list)
+ # TODO: Remove this once global config.LOAD_PATHS is a list.
+ if hasattr(config.LOAD_PATHS, 'split'):
+ config.LOAD_PATHS = ','.join(load_path_list)
else:
- scss.LOAD_PATHS = load_path_list
+ config.LOAD_PATHS = load_path_list
if options.assets_url is not None:
- scss.ASSETS_URL = options.assets_url
+ config.ASSETS_URL = options.assets_url
# Execution modes
if options.test:

0 comments on commit 1c4335b

Please sign in to comment.