fixed yaml import issue 1333, thanks Alan
This commit is contained in:
@@ -1 +1 @@
|
|||||||
Version 2.4.1-alpha.2+timestamp.2013.02.13.08.47.47
|
Version 2.4.1-alpha.2+timestamp.2013.02.13.09.30.42
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ except ImportError:
|
|||||||
|
|
||||||
have_yaml = True
|
have_yaml = True
|
||||||
try:
|
try:
|
||||||
import yaml
|
import yaml as yamlib
|
||||||
except ImportError:
|
except ImportError:
|
||||||
have_yaml = False
|
have_yaml = False
|
||||||
|
|
||||||
@@ -131,11 +131,11 @@ def rss(feed):
|
|||||||
|
|
||||||
def yaml(data):
|
def yaml(data):
|
||||||
if have_yaml:
|
if have_yaml:
|
||||||
return yaml.dump(data)
|
return yamlib.dump(data)
|
||||||
else: raise ImportError("No YAML serializer available")
|
else: raise ImportError("No YAML serializer available")
|
||||||
|
|
||||||
def loads_yaml(data):
|
def loads_yaml(data):
|
||||||
if have_yaml:
|
if have_yaml:
|
||||||
return yaml.load(data)
|
return yamlib.load(data)
|
||||||
else: raise ImportError("No YAML serializer available")
|
else: raise ImportError("No YAML serializer available")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user