From 098da4124ff780843415b6edb7b0b67ea89ec404 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 13 Feb 2013 09:31:26 -0600 Subject: [PATCH] fixed yaml import issue 1333, thanks Alan --- VERSION | 2 +- gluon/serializers.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 4a54ac51..191e1d84 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/serializers.py b/gluon/serializers.py index 1d2621d2..c4268599 100644 --- a/gluon/serializers.py +++ b/gluon/serializers.py @@ -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")