File: descriptor_crash.py

package info (click to toggle)
logilab-astng 0.24.3-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 700 kB
  • ctags: 1,300
  • sloc: python: 7,563; makefile: 56; sh: 15
file content (11 lines) | stat: -rw-r--r-- 217 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11

import urllib

class Page(object):
    _urlOpen = staticmethod(urllib.urlopen)

    def getPage(self, url):
        handle = self._urlOpen(url)
        data = handle.read()
        handle.close()
        return data