Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def lineno(self):
header.append(fe.line)
fe.next()
if fe.is_empty:
if p == None:
if p is None:
debug("no patch data found") # error is shown later
self.errors += 1
else:
Expand Down Expand Up @@ -941,7 +941,6 @@ def apply(self, strip=0, root=None):
if exists(backupname):
warning("can't backup original file to %s - aborting" % backupname)
else:
import shutil
shutil.move(filename, backupname)
if self.write_hunks(backupname, filename, p.hunks):
info("successfully patched %d/%d:\t %s" % (i+1, total, filename))
Expand Down Expand Up @@ -1005,7 +1004,6 @@ class NoMatch(Exception):

lineno = 1
line = fp.readline()
hno = None
try:
for hno, h in enumerate(hunks):
# skip to first line of the hunk
Expand Down