diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2011-03-23 02:02:56 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2011-03-23 02:02:59 -0400 |
| commit | cddbd78a61871a91d5ef8d3b883cb43cfd145f75 (patch) | |
| tree | c8e1e8835fab321300d78dbbcead603d99f05480 /tablib/formats/_yaml.py | |
| parent | b113f49ce6aa4dec565b5c0ee30074a9ecdaf3f4 (diff) | |
| download | tablib-cddbd78a61871a91d5ef8d3b883cb43cfd145f75.tar.gz | |
autoload 3 modules if using 3
Diffstat (limited to 'tablib/formats/_yaml.py')
| -rw-r--r-- | tablib/formats/_yaml.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tablib/formats/_yaml.py b/tablib/formats/_yaml.py index 3f2f8b7..0124c94 100644 --- a/tablib/formats/_yaml.py +++ b/tablib/formats/_yaml.py @@ -3,10 +3,16 @@ """ Tablib - YAML Support. """ +import sys + try: import yaml except ImportError: - import tablib.packages.yaml as yaml + if sys.version_info.major > 2: + import tablib.packages.yaml3 as yaml + else: + import tablib.packages.yaml as yaml + import tablib |
