check wether needed tools are installed
(self, check_name, legend, python=True, essential=False)
| 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""" |