查询快照是否存在于gcp云中时出现异常BadStatusLine''

时间:2018-07-31 11:54:00

标签: google-cloud-platform httplib

我创建了50个磁盘的快照,因为gcloud不允许使用类似名称的快照。因此,在再次触发快照创建之前。我检查了gcp中是否存在快照,并同时触发了50个请求,几乎有5-6个请求失败,但出现以下异常。

File "/tmp/cloudpoint/libs/gcp/lib/oauth2client/_helpers.py", line 133, in positional_wrapper
    return wrapped(*args, **kwargs)
  File "/tmp/cloudpoint/libs/gcp/lib/googleapiclient/http.py", line 837, in execute
    method=str(self.method), body=self.body, headers=self.headers)
  File "/tmp/cloudpoint/libs/gcp/lib/googleapiclient/http.py", line 163, in _retry_request
    resp, content = http.request(uri, method, *args, **kwargs)
  File "/tmp/cloudpoint/libs/gcp/lib/oauth2client/transport.py", line 175, in new_request
    redirections, connection_type)
  File "/tmp/cloudpoint/libs/gcp/lib/oauth2client/transport.py", line 282, in request
    connection_type=connection_type)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1607, in request
    (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1349, in _request
    (response, content) = self._conn_request(conn, request_uri, method, body, headers)
  File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1305, in _conn_request
    response = conn.getresponse()
  File "/usr/lib/python2.7/httplib.py", line 1136, in getresponse
    response.begin()
  File "/usr/lib/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python2.7/httplib.py", line 417, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

0 个答案:

没有答案