diff options
author | Eevee <eevee.github@veekun.com> | 2014-10-17 15:17:54 -0700 |
---|---|---|
committer | Eevee <eevee.github@veekun.com> | 2014-10-17 15:17:54 -0700 |
commit | 026b71bba764e0635258f3d1b73616d7ca8215f4 (patch) | |
tree | 869252178c109e828265850516caec47e1e0f6cf | |
parent | ab631f370e4366d095916f715c521be2ddadadb5 (diff) | |
parent | 38cea2963b1dafd1442e81e91f3ed38ccc287736 (diff) | |
download | pyscss-026b71bba764e0635258f3d1b73616d7ca8215f4.tar.gz |
Merge pull request #310 from jrcartee/master
Small bug fixes
-rw-r--r-- | scss/legacy.py | 2 | ||||
-rw-r--r-- | scss/source.py | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/scss/legacy.py b/scss/legacy.py index fef131f..1e69e65 100644 --- a/scss/legacy.py +++ b/scss/legacy.py @@ -169,7 +169,7 @@ class Scss(object): # filename a source "thinks" it is with open(scss_file, 'rb') as f: source = SourceFile.from_file( - scss_file, + f, relpath=filename or scss_file, is_sass=is_sass, ) diff --git a/scss/source.py b/scss/source.py index 960fd89..a3725f8 100644 --- a/scss/source.py +++ b/scss/source.py @@ -186,7 +186,12 @@ class SourceFile(object): return cls.from_file(f, origin, relpath, **kwargs) # back-compat - from_filename = from_path + @classmethod + def from_filename(cls, path_string, origin=MISSING, **kwargs): + """ Read Sass source from a String specifying the path + """ + path = Path(path_string) + return cls.from_path(path, origin, **kwargs) @classmethod def from_file(cls, f, origin=MISSING, relpath=MISSING, **kwargs): |