summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHunter Blanks <hblanks@artifex.org>2013-09-25 22:54:55 -0700
committerHunter Blanks <hblanks@artifex.org>2013-09-25 22:56:20 -0700
commitdac2330fefa18bb7f02993d00a68616ea80b70dd (patch)
tree94a3f51c075e563e99e5f176173d352d9f443d07
parent729d91d0a6a2355d9ef95d40567fb40f2897ace7 (diff)
downloadpyscss-dac2330fefa18bb7f02993d00a68616ea80b70dd.tar.gz
scss/__init__.py: raise RuntimeWarning instead of writing to sys.stderr when _speedups is not found
-rw-r--r--scss/__init__.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/scss/__init__.py b/scss/__init__.py
index 04b6abe..a87ab23 100644
--- a/scss/__init__.py
+++ b/scss/__init__.py
@@ -81,7 +81,11 @@ locate_blocks = None
try:
from scss._speedups import locate_blocks
except ImportError:
- sys.stderr.write("Scanning acceleration disabled (_speedups not found)!\n")
+ import warnings
+ warnings.warn(
+ "Scanning acceleration disabled (_speedups not found)!",
+ RuntimeWarning
+ )
from scss._native import locate_blocks
################################################################################