fixed yaml import issue 1333, thanks Alan

This commit is contained in:
mdipierro
2013-02-13 09:31:26 -06:00
parent b39788f883
commit 098da4124f
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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
+3 -3
View File
@@ -21,7 +21,7 @@ except ImportError:
have_yaml = True
try:
import yaml
import yaml as yamlib
except ImportError:
have_yaml = False
@@ -131,11 +131,11 @@ def rss(feed):
def yaml(data):
if have_yaml:
return yaml.dump(data)
return yamlib.dump(data)
else: raise ImportError("No YAML serializer available")
def loads_yaml(data):
if have_yaml:
return yaml.load(data)
return yamlib.load(data)
else: raise ImportError("No YAML serializer available")