Merge "Use ==
to compare against the empty string, not is
"
This commit is contained in:
commit
0e5a32000a
@ -267,7 +267,7 @@ def run_daemon(klass, conf_file, section_name='', once=False, **kwargs):
|
||||
"""
|
||||
# very often the config section_name is based on the class name
|
||||
# the None singleton will be passed through to readconf as is
|
||||
if section_name is '':
|
||||
if section_name == '':
|
||||
section_name = sub(r'([a-z])([A-Z])', r'\1-\2',
|
||||
klass.__name__).lower()
|
||||
try:
|
||||
|
@ -217,7 +217,7 @@ def parse_acl_v2(data):
|
||||
"""
|
||||
if data is None:
|
||||
return None
|
||||
if data is '':
|
||||
if data == '':
|
||||
return {}
|
||||
try:
|
||||
result = json.loads(data)
|
||||
|
@ -187,7 +187,7 @@ class TestRequest(S3ApiTestCase):
|
||||
self.assertEqual(mock_get_resp.call_count, 2)
|
||||
args, kargs = mock_get_resp.call_args_list[0]
|
||||
get_resp_obj = args[3]
|
||||
self.assertTrue(get_resp_obj is '')
|
||||
self.assertEqual(get_resp_obj, '')
|
||||
self.assertEqual(m_check_permission.call_count, 1)
|
||||
args, kargs = m_check_permission.call_args
|
||||
permission = args[1]
|
||||
|
@ -600,7 +600,7 @@ class TestWSGI(unittest.TestCase):
|
||||
logger = logging.getLogger('test')
|
||||
sock = listen_zero()
|
||||
wsgi.run_server(conf, logger, sock)
|
||||
self.assertTrue(os.environ['TZ'] is not '')
|
||||
self.assertNotEqual(os.environ['TZ'], '')
|
||||
|
||||
self.assertEqual(30, _wsgi.WRITE_TIMEOUT)
|
||||
_wsgi_evt.hubs.use_hub.assert_called_with(utils.get_hub())
|
||||
|
Loading…
Reference in New Issue
Block a user