Skip to content

Commit 8aed15b

Browse files
committed
Merge remote-tracking branch 'misery/master'
2 parents 82c71ef + 942aab5 commit 8aed15b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

patch.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def lineno(self):
369369
header.append(fe.line)
370370
fe.next()
371371
if fe.is_empty:
372-
if p == None:
372+
if p is None:
373373
debug("no patch data found") # error is shown later
374374
self.errors += 1
375375
else:
@@ -992,7 +992,6 @@ def apply(self, strip=0, root=None):
992992
if exists(backupname):
993993
warning("can't backup original file to %s - aborting" % backupname)
994994
else:
995-
import shutil
996995
shutil.move(filenamen, backupname)
997996
if self.write_hunks(backupname if filenameo == filenamen else filenameo, filenamen, p.hunks):
998997
info("successfully patched %d/%d:\t %s" % (i+1, total, filenamen))
@@ -1061,7 +1060,6 @@ class NoMatch(Exception):
10611060

10621061
lineno = 1
10631062
line = fp.readline()
1064-
hno = None
10651063
try:
10661064
for hno, h in enumerate(hunks):
10671065
# skip to first line of the hunk

0 commit comments

Comments
 (0)