Author: Ronan Lamy <[email protected]>
Branch: 
Changeset: r73412:2268afdc52e2
Date: 2014-09-10 03:04 +0100
http://bitbucket.org/pypy/pypy/changeset/2268afdc52e2/

Log:    Tell the annotator that RFile.read cannot return None

        Since the return value of fread is checked, buf cannot be NULL and s
        is therefore really a string.

diff --git a/rpython/rlib/rfile.py b/rpython/rlib/rfile.py
--- a/rpython/rlib/rfile.py
+++ b/rpython/rlib/rfile.py
@@ -323,6 +323,7 @@
                     if not c_feof(ll_file):
                         raise _error(ll_file)
                 s = buf.str(returned_size)
+                assert s is not None
             return s
 
     def _readline1(self, raw_buf):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to