| OLD | NEW |
| 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Base class with common routines between the Apache and Lighttpd servers.""" | 5 """Base class with common routines between the Apache and Lighttpd servers.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import time | 8 import time |
| 9 import urllib | 9 import urllib |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 url = 'http%s://127.0.0.1:%d/' % (http_suffix, mapping['port']) | 33 url = 'http%s://127.0.0.1:%d/' % (http_suffix, mapping['port']) |
| 34 | 34 |
| 35 try: | 35 try: |
| 36 response = urllib.urlopen(url) | 36 response = urllib.urlopen(url) |
| 37 logging.debug("Server running at %s" % url) | 37 logging.debug("Server running at %s" % url) |
| 38 except IOError: | 38 except IOError: |
| 39 logging.debug("Server NOT running at %s" % url) | 39 logging.debug("Server NOT running at %s" % url) |
| 40 return False | 40 return False |
| 41 | 41 |
| 42 return True | 42 return True |
| OLD | NEW |