Skip to content

Commit

Permalink
Adjust to suggestions in PR.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Jan 27, 2019
1 parent 9f69e04 commit 1bb7be6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -44,16 +44,15 @@ def read(*rnames):
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: Implementation",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Natural Language :: English",
"Operating System :: OS Independent",
"Topic :: Software Development :: Libraries :: Python Modules",
"Framework :: Plone",
"Framework :: Zope",
"Framework :: Zope :: 2",
"Framework :: Zope :: 3",
"Framework :: Zope :: 4",
],
keywords="zpt template zope",
url="https://github.com/zopefoundation/z3c.ptcompat",
Expand Down
16 changes: 8 additions & 8 deletions tools/update.py
Expand Up @@ -124,7 +124,8 @@ def main(options, args):
output, err = proc.communicate("\n".join(diffs) + "\n")

if proc.returncode != 0:
map(status, output.split("\n"))
for line in output.split("\n"):
status(line)
status("An error occurred while applying patches.")
break
else:
Expand All @@ -145,13 +146,12 @@ def create_diff(filename):
new = exp.sub(replacement, new)

if original != new:
return "\n".join(
map(
str.rstrip,
difflib.unified_diff(
original.split("\n"), new.split("\n"), filename, filename
),
)
return ''.join(
difflib.unified_diff(
original.splitlines(True),
new.splitlines(True),
filename,
filename)
)


Expand Down

0 comments on commit 1bb7be6

Please sign in to comment.