Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(525)

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/server_base.py

Issue 2569153003: In "pylint: disable=" comments in webkitpy, use symbolic names. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 for mapping in self._mappings: 268 for mapping in self._mappings:
269 s = socket.socket() 269 s = socket.socket()
270 if not self._platform.is_win(): 270 if not self._platform.is_win():
271 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) 271 s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
272 port = mapping['port'] 272 port = mapping['port']
273 try: 273 try:
274 s.bind(('localhost', port)) 274 s.bind(('localhost', port))
275 except IOError as e: 275 except IOError as e:
276 if e.errno in (errno.EALREADY, errno.EADDRINUSE): 276 if e.errno in (errno.EALREADY, errno.EADDRINUSE):
277 raise ServerError('Port %d is already in use.' % port) 277 raise ServerError('Port %d is already in use.' % port)
278 elif self._platform.is_win() and e.errno in (errno.WSAEACCES,): # pylint: disable=E1101 278 elif self._platform.is_win() and e.errno in (errno.WSAEACCES,): # pylint: disable=no-member
279 raise ServerError('Port %d is already in use.' % port) 279 raise ServerError('Port %d is already in use.' % port)
280 else: 280 else:
281 raise 281 raise
282 finally: 282 finally:
283 s.close() 283 s.close()
284 _log.debug('all ports are available') 284 _log.debug('all ports are available')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698