Skip to content

Commit 6571b50

Browse files
committed
Only try to open a legacy url if it leads to a file; not if it leads to a directory.
- Legacy-Id: 2770
1 parent 2658ff2 commit 6571b50

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/ipr/search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def patent_file_search(url, q):
4141
fname = url.split("/")[-1]
4242
fpath = os.path.join(settings.IPR_DOCUMENT_PATH, fname)
4343
#print "*** Checking file", fpath
44-
if os.path.exists(fpath):
44+
if os.path.isfile(fpath):
4545
#print "*** Found file", fpath
4646
file = codecs.open(fpath, mode='r', encoding='utf-8', errors='replace')
4747
text = file.read()

0 commit comments

Comments
 (0)