MCPcopy Index your code
hub / github.com/pyload/pyload / check_install

Method check_install

pyLoadCore.py:529–544  ·  view source on GitHub ↗

check wether needed tools are installed

(self, check_name, legend, python=True, essential=False)

Source from the content-addressed store, hash-verified

527 h.close()
528
529 def check_install(self, check_name, legend, python=True, essential=False):
530 """check wether needed tools are installed"""
531 try:
532 if python:
533 find_module(check_name)
534 else:
535 pipe = subprocess.PIPE
536 subprocess.Popen(check_name, stdout=pipe, stderr=pipe)
537
538 return True
539 except:
540 if essential:
541 self.log.info(_("Install %s") % legend)
542 exit()
543
544 return False
545
546 def check_file(self, check_names, description="", folder=False, empty=True, essential=False, quiet=False):
547 """check wether needed files exists"""

Callers 1

startMethod · 0.95

Calls 1

_Function · 0.50

Tested by

no test coverage detected