Commits

Gael Pasgrimaud committed c756c59

fix #55

  • Participants
  • Parent commits 0512a85

Comments (0)

Files changed (1)

pyquery/pyquery.py

         if kwargs:
             # specific case to get the dom
             if 'filename' in kwargs:
-                html = open(kwargs['filename'])
+                fd = open(kwargs['filename'])
+                html = fd.read()
+                fd.close()
             elif 'url' in kwargs:
                 url = kwargs.pop('url')
                 if 'opener' in kwargs: