/logilab-astng-0.23.1/test/regrtest_data/descriptor_crash.py
Python | 31 lines | 8 code | 3 blank | 20 comment | 0 complexity | a2e24e9f66f5179d7197af1b815acae1 MD5 | raw file
Possible License(s): GPL-2.0, LGPL-2.1
- # -*- coding: iso-8859-1 -*-
- # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
- # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
- # copyright 2003-2010 Sylvain Thenault, all rights reserved.
- # contact mailto:thenault@gmail.com
- #
- # This file is part of logilab-astng.
- #
- # logilab-astng is free software: you can redistribute it and/or modify it
- # under the terms of the GNU Lesser General Public License as published by the
- # Free Software Foundation, either version 2.1 of the License, or (at your
- # option) any later version.
- #
- # logilab-astng is distributed in the hope that it will be useful, but
- # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- # for more details.
- #
- # You should have received a copy of the GNU Lesser General Public License along
- # with logilab-astng. If not, see <http://www.gnu.org/licenses/>.
- import urllib
- class Page(object):
- _urlOpen = staticmethod(urllib.urlopen)
- def getPage(self, url):
- handle = self._urlOpen(url)
- data = handle.read()
- handle.close()
- return data