Skip to content

Commit eb02c16

Browse files
committed
A few more bug fixes
1 parent 0df27b1 commit eb02c16

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

webdiff/diff.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
'''
1212

1313
import mimetypes
14+
import os
1415

1516
import util
1617

@@ -94,7 +95,10 @@ def find_diff_index(diffs, side, path):
9495
Returns None if there's no diff for the (side, path) pair.
9596
'''
9697
assert side in ('a', 'b')
97-
norm = os.path.normpath
98+
def norm(p):
99+
if p is None: return None
100+
return os.path.normpath(p)
101+
98102
path = norm(path)
99103
for idx, diff in enumerate(diffs):
100104
if side == 'a' and norm(diff.a) == path:

webdiff/githubdiff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, pr, github_file):
2020
self._file = github_file
2121
self.type = {
2222
'modified': 'change',
23+
'changed': 'change', # How does this differ from 'modified'?
2324
'renamed': 'move',
2425
'added': 'add',
2526
'removed': 'delete'

0 commit comments

Comments
 (0)