zopefoundation/bobo — pull request #5 by kilink (2014-04-10 21:18:47+00:00)
Title: Fix Reload issue when module's path ends in .pyc or .pyo

Occasionally the Reload middleware will cause an exception to be raised when attempting to reload a module:

``
...
File '/Users/patrick/.buildout/eggs/bobo-2.0.0-py2.7.egg/boboserver.py', line 136 in __call__
six.exec_(compile(open(path).read(), path, 'exec'), TypeError: compile() expected string without null bytes``

This occurs when the module's path (as given by \_\_file\_\_) does not end in .py (e.g., .pyc or .pyo).

I'm still working on a test case for this that's not totally contrived, but the fix is pretty simple.