Hi,
I can indeed reproduce this issue when the root urlconf only contains one non-empty pattern.
The urlconf itself works (I can access my view by navigating to the correct URL) but the problem is in the debug view.
If I try to access a URL that's not mapped to anything, the debug view is triggered and the reported exception occurs.
Note that this only affects the 1.6 and master branch, and that this regression was introduced by commit 3f1c7b70537330435e2ec2fca9550f7b7fa4372e.
As for your patch, it does seem to fix the issue and it even passes the full test suite but it seems wrong to just be removing code.
In any case, a full patch will also require a regression testcase so I'm marking this as patch needs improvement
.
Thanks.