Showing 203 of 446 total issues
Avoid too many return
statements within this function. Open
return False, "Error Occurred: Timeout while starting VM"
Avoid too many return
statements within this function. Open
return dispatch_kind(vm_name, kind, args, result_id, tries)
Avoid too many return
statements within this function. Open
return "%s, ERROR: not updated. Reason: %s" % (vm_name, e)
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return True
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return self.check_upgraded(instance_id, level, fast)
Avoid too many return
statements within this function. Open
return
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def execute(vm, protocol, args):
logging.debug(" CS Execute: args %s" % args)
assert protocol
assert protocol.procedure
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function execute_scout
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def execute_scout(self):
""" build and execute the """
factory_id, ident, exe = self.execute_pull()
self._execute_build(exe)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function main
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def main():
print "let's build ya"
p = {
"desktop": ["windows", "linux", "osx"],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function refresh_snapshot
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def refresh_snapshot(self, delete=True):
untouchables = ["ready", "activated", "_datarecovery_"]
date = datetime.now().strftime('%Y%m%d-%H%M')
self.create_snapshot(date)
if delete is True:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function wait_for_startup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def wait_for_startup(vm, message=None, max_minute=8):
#r = Redis()
r = StrictRedis(socket_timeout=max_minute * 60)
p = r.pubsub()
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function longPress
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def longPress(self, name):
# WORKAROUND:
# Using 'input keyevent --longpress POWER' does not work correctly in
# KitKat (API 19), it sends a short instead of a long press.
# This uses the events instead, but it may vary from device to device.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function execute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def execute(vm, protocol, inst_args):
from AVMaster import vm_manager
""" client side, returns (bool,*) """
logging.debug(" INSTALL_AGENT" )
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function copy_to_guest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def copy_to_guest(vm, test_dir, filestocopy):
#lib_dir = "%s\\lib" % test_dir
#assets_dir = "%s\\assets" % test_dir
vmavtest = "../AVAgent"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _build_agent
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _build_agent(self, factory, melt = None, demo = False, tries = 0):
with connection() as c:
params = {}
params['blackberry'] = {'platform': 'blackberry',
'binary': {'demo': demo},
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function search_plan
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def search_plan(proj_id, plan_id=-1, plan_name=""):
for p in get_plans(proj_id):
if p["is_completed"]:
continue
if p["id"] == plan_id or p["name"] == plan_name:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function copy_to_guest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def copy_to_guest(vm, test_dir, filestocopy):
#lib_dir = "%s\\lib" % test_dir
#assets_dir = "%s\\assets" % test_dir
vmavtest = "../AVAgent"
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"