labpack/platforms/heroku.py
def _validate_install(self):

        ''' a method to validate heroku is installed '''

        self.printer('Checking heroku installation ... ', flush=True)
    
    # import dependencies
        import re
        from os import devnull
        from subprocess import call, check_output
        
    # validate cli installation
        sys_command = 'heroku --version'
        try:
            response = check_output(sys_command, shell=True, stderr=open(devnull, 'wb')).decode('utf-8')
            search = re.findall('heroku/(\d+\.\d+\.\d+)', response)
            if search:
                if search[0] > '7.22.2':
                    self.printer('WARNING\nWARNING: Heroku version %s may break deployment. Only versions <= 7.22.2 tested. ' % search[0], flush=True)
        except Exception as err:
            self.printer('ERROR')
            raise Exception('"heroku cli" not installed. GoTo: https://devcenter.heroku.com/articles/heroku-cli')
    
    # print response and return
        self.printer('done.')
        
        return True
 a method to validate heroku is installed 
a method to validate heroku is installed
a method to validate heroku is installed
def _validate_install(self):
        self.printer('Checking heroku installation ... ', flush=True)
        import re
        from os import devnull
        from subprocess import call, check_output
        sys_command = 'heroku --version'
        try:
            response = check_output(sys_command, shell=True, stderr=open(devnull, 'wb')).decode('utf-8')
            search = re.findall('heroku/(\d+\.\d+\.\d+)', response)
            if search:
                if search[0] > '7.22.2':
                    self.printer('WARNING\nWARNING: Heroku version %s may break deployment. Only versions <= 7.22.2 tested. ' % search[0], flush=True)
        except Exception as err:
            self.printer('ERROR')
            raise Exception('"heroku cli" not installed. GoTo: https://devcenter.heroku.com/articles/heroku-cli')
        self.printer('done.')
        return True
def _validate_install ( self ) : self . printer ( 'Checking heroku installation ... ' , flush = True ) import re from os import devnull from subprocess import call , check_output sys_command = 'heroku --version' try : response = check_output ( sys_command , shell = True , stderr = open ( devnull , 'wb' ) ) . decode ( 'utf-8' ) search = re . findall ( 'heroku/(\d+\.\d+\.\d+)' , response ) if search : if search [ 0 ] > '7.22.2' : self . printer ( 'WARNING\nWARNING: Heroku version %s may break deployment. Only versions <= 7.22.2 tested. ' % search [ 0 ] , flush = True ) except Exception as err : self . printer ( 'ERROR' ) raise Exception ( '"heroku cli" not installed. GoTo: https://devcenter.heroku.com/articles/heroku-cli' ) self . printer ( 'done.' ) return True
a method to validate heroku is installed
a method to validate heroku is installed
''' a method to validate heroku is installed ''' # import dependencies
 # validate cli installation
 # print response and return

self