Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def supported(self):
"""
Check if macports is installed
"""
return sysutils.which('port') is not None
def supported(self):
"""
Check if we're on a Debian/Ubuntu.
Return True if so.
"""
has_dpkg = sysutils.which('dpkg') is not None
# has_apt = sysutils.which('apt') is not None or \
# Replace this line with the one above to re-enable apt (also need to change something above):
has_apt = False or \
(sysutils.which('apt-cache') is not None \
and sysutils.which('apt-get') is not None)
return has_dpkg and has_apt
def __init__(self, logger):
ExternPackager.__init__(self, logger)
self.command = None
if sysutils.which('pacman') is not None:
self.command = 'pacman'
def get_md5(filename):
" Return MD5 sum of filename using the md5sum tool "
md5_exe = sysutils.which('md5sum')
if md5_exe is not None:
return subproc.check_output([md5_exe, filename])[0:32]
return None
from pybombs.utils import sysutils