1 |
commit: ea0f8cbcc126a53bc450b4161c8910fe1d9af778 |
2 |
Author: André Erdmann <dywi <AT> mailerd <DOT> de> |
3 |
AuthorDate: Mon Mar 31 18:30:18 2014 +0000 |
4 |
Commit: André Erdmann <dywi <AT> mailerd <DOT> de> |
5 |
CommitDate: Tue Apr 1 16:36:36 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=ea0f8cbc |
7 |
|
8 |
fileio: catch EOFError |
9 |
|
10 |
--- |
11 |
roverlay/util/fileio.py | 2 +- |
12 |
1 file changed, 1 insertion(+), 1 deletion(-) |
13 |
|
14 |
diff --git a/roverlay/util/fileio.py b/roverlay/util/fileio.py |
15 |
index dc96119..804aa9f 100644 |
16 |
--- a/roverlay/util/fileio.py |
17 |
+++ b/roverlay/util/fileio.py |
18 |
@@ -76,7 +76,7 @@ def read_text_file ( filepath, preparse=None, try_harder=True ): |
19 |
# safely read first line only |
20 |
line = next ( creader ) |
21 |
|
22 |
- except StopIteration: |
23 |
+ except ( StopIteration, EOFError ): |
24 |
# empty file (?) |
25 |
CH.close() |
26 |
return |