Skip to content

Commit aebbb15

Browse files
Santhosh EdukullaGirish Shilamkar
authored andcommitted
Fixed a connection issue under asyncmgr.
Fixed a connection issue under asyncmgr. Added __init__.py files to directory to make it a package.This file was missing under few directories and so not appearing as packages while refactoring. Adding one None Check
1 parent 1b2f1d7 commit aebbb15

4 files changed

Lines changed: 37 additions & 1 deletion

File tree

tools/marvin/marvin/asyncJobMgr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def executeCmd(self, job):
8888
time.mktime(jobstatus.endTime.timetuple()) - time.mktime(
8989
jobstatus.startTime.timetuple())
9090
else:
91-
result = self.connection.marvin_request(cmd)
91+
result = self.connection.marvinRequest(cmd)
9292
if result is None:
9393
jobstatus.status = False
9494
else:

tools/marvin/marvin/cloudstackConnection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ def marvinRequest(self, cmd, response_type=None, method='GET', data=''):
271271
self.auth,
272272
payload=payload,
273273
method=method)
274+
if response is None:
275+
return None
274276
self.logging.debug("Request: %s Response: %s" %
275277
(response.url, response.text))
276278
try:
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+

0 commit comments

Comments
 (0)