summaryrefslogtreecommitdiff
path: root/tablib/core.py
diff options
context:
space:
mode:
authorrabinnankhwa <rabin.nankhwa@gmail.com>2014-08-30 08:56:17 +0545
committerrabinnankhwa <rabin.nankhwa@gmail.com>2014-08-30 08:56:17 +0545
commit87892d7266d8808374d2c32becc9df4687431227 (patch)
tree59c9dc10bbcfae2002cced5b2501a6ff7ab8999b /tablib/core.py
parent20e2ce5ba0382f66eee747f932265087ef7c1ec8 (diff)
downloadtablib-87892d7266d8808374d2c32becc9df4687431227.tar.gz
used get method of dictionary instead of exception handling
Diffstat (limited to 'tablib/core.py')
-rw-r--r--tablib/core.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/tablib/core.py b/tablib/core.py
index e2116f8..76f4569 100644
--- a/tablib/core.py
+++ b/tablib/core.py
@@ -163,15 +163,9 @@ class Dataset(object):
# (column, callback) tuples
self._formatters = []
- try:
- self.headers = kwargs['headers']
- except KeyError:
- self.headers = None
+ self.headers = kwargs.get('headers')
- try:
- self.title = kwargs['title']
- except KeyError:
- self.title = None
+ self.title = kwargs.get('title')
self._register_formats()