Don't die when getting attrs of a directory.
authorBernie Innocenti <bernie@codewiz.org>
Wed, 13 Aug 2008 09:04:14 +0000 (11:04 +0200)
committerBernie Innocenti <bernie@codewiz.org>
Wed, 13 Aug 2008 09:04:14 +0000 (11:04 +0200)
geekigeeki.py

index 5abd90f3f2c72d2a49ddf0df4a9390e66a79733b..287a945cf45a2e56e4d26ef2f0c58b12c5c24484 100755 (executable)
@@ -622,7 +622,7 @@ class Page:
                 self.attrs[m.group(1)] = m.group(2).strip()
                 #print "bernie: attrs[" + m.group(1) + "] = " + m.group(2) + "<br>\n"
         except IOError, er:
-            if er.errno != errno.ENOENT:
+            if er.errno != errno.ENOENT and er.errno != errno.EISDIR:
                 raise er
         return self.attrs