diff options
| author | Kenneth Reitz <me@kennethreitz.com> | 2010-09-25 04:49:31 -0400 |
|---|---|---|
| committer | Kenneth Reitz <me@kennethreitz.com> | 2010-09-25 04:49:31 -0400 |
| commit | 8d6a52aaf5d228fa48d55f0133ea52e93537683e (patch) | |
| tree | 0a2a987f5b6d900539cc54880235b102aeda7176 /tablib/core.py | |
| parent | 703b1da04cf3b3c883b26ad9746b16e59da377d3 (diff) | |
| download | tablib-8d6a52aaf5d228fa48d55f0133ea52e93537683e.tar.gz | |
Cleanups for pylint.
Diffstat (limited to 'tablib/core.py')
| -rw-r--r-- | tablib/core.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tablib/core.py b/tablib/core.py index 1022e07..f0eb43d 100644 --- a/tablib/core.py +++ b/tablib/core.py @@ -129,13 +129,13 @@ class Dataset(object): @headers.setter - def headers(self, collection): + def headers_set(self, collection): """Validating headers setter.""" self._validate(collection) if collection: try: self.__headers = list(collection) - except TypeError, why: + except TypeError: raise TypeError else: self.__headers = None @@ -260,19 +260,19 @@ class Databook(object): """Returns XLS representation of DataBook.""" - wb = xlwt.Workbook(encoding='utf8') + workb = xlwt.Workbook(encoding='utf8') for i, dset in enumerate(self._datasets): - ws = wb.add_sheet(dset.title if dset.title else 'Sheet%s' % (i)) + works = workb.add_sheet(dset.title if dset.title else 'Sheet%s' % (i)) #for row in self._package(dicts=False): for i, row in enumerate(dset._package(dicts=False)): for j, col in enumerate(row): - ws.write(i, j, col) + works.write(i, j, col) stream = cStringIO.StringIO() - wb.save(stream) + workb.save(stream) return stream.getvalue() |
