Merge pull request #42524 from rallytime/merge-2017.7

[2017.7] Merge forward from 2016.11 to 2017.7
This commit is contained in:
Nicole Thomas 2017-07-26 16:41:05 -06:00 committed by GitHub
commit 60cd078164
3 changed files with 11 additions and 7 deletions

View file

@ -896,9 +896,9 @@ def _assign_floating_ips(vm_, conn, kwargs):
floating.append(idx)
break
if not floating:
raise SaltCloudSystemExit(
log.warning(
'There are no more floating IP addresses '
'available, please create some more'
'available, please create some more if necessary'
)
except Exception as e:
if str(e).startswith('404'):

View file

@ -160,9 +160,13 @@ def row_absent(name, db, table, where_sql, where_args=None):
changes['changes']['old'] = rows[0]
else:
cursor = conn.execute("DELETE FROM `" +
table + "` WHERE " + where_sql,
where_args)
if where_args is None:
cursor = conn.execute("DELETE FROM `" +
table + "` WHERE " + where_sql)
else:
cursor = conn.execute("DELETE FROM `" +
table + "` WHERE " + where_sql,
where_args)
conn.commit()
if cursor.rowcount == 1:
changes['result'] = True

View file

@ -466,8 +466,8 @@ def query(url,
# We want to use curl_http if we have a proxy defined
if proxy_host and proxy_port:
if HAS_CURL_HTTPCLIENT is False:
ret['error'] = ('proxy_host and proxy_port has been set. This requires pycurl, but the '
'pycurl library does not seem to be installed')
ret['error'] = ('proxy_host and proxy_port has been set. This requires pycurl and tornado, '
'but the libraries does not seem to be installed')
log.error(ret['error'])
return ret