Skip to content

Commit

Permalink
Merge pull request #21 from bartkl/python3
Browse files Browse the repository at this point in the history
Altered code to make it Python 3 compatible (while breaking Python 2 …
  • Loading branch information
bartkl authored Jun 2, 2020
2 parents 6ac1efe + e50b948 commit 330ead4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions ExcellentLibrary/ExcellentLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _get_alias_of_workbook_by_file_path(self, file_path):
"""Gets the alias of the workbook identified by the supplied
file path.
"""
for alias, workbook_entry in self.workbooks.iteritems():
for alias, workbook_entry in self.workbooks.items():
if workbook_entry["file_path"] == file_path:
return alias

Expand Down Expand Up @@ -239,7 +239,8 @@ def close_workbook(self, alias=None):
self._remove_from_workbooks(alias)

if set_new_active_workbook and len(self.workbooks) > 0:
new_alias = self.workbooks.keys()[0]
print(self.workbooks.keys())
new_alias = list(self.workbooks.keys())[0]
self._set_new_active_workbook(new_alias)

except KeyError:
Expand Down Expand Up @@ -497,7 +498,7 @@ def read_sheet_data(self,
except IndexError:
raise TooFewColumnNamesSuppliedException

if not all(value is None for value in row_data.itervalues()):
if not all(value is None for value in row_data.values()):
sheet_data.append(row_data)
else:
sheet_data = []
Expand Down
Binary file modified Tests/Proper Excel File.xlsx
Binary file not shown.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

setuptools.setup(
name="robotframework-excellentlibrary",
version="0.9.3",
version="1.0.0",
author="Bart Kleijngeld",
author_email="[email protected]",
description="A really useful Robot Framework library for working with Excel 2010 (and above) files.",
url="https://github.com/bartkl/robotframework-excellentlibrary",
packages=setuptools.find_packages(),
classifiers=(
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
),
python_requires="~=2.7",
install_requires="openpyxl>=2.5.4",
python_requires="~=3.6",
install_requires="openpyxl>=3.0.3",
keywords="excel testing robotframework robotframework-excellibrary robotframework-excellib"
)

0 comments on commit 330ead4

Please sign in to comment.