def do_load(self, line):
        """Load a backup based on its number per `list`..
        """
        try:
            i = int(line)
            filename = self.get_filenames()[i]
        except (ValueError, __HOLE__):
            print('\x1b[31;1mBad backup number!\x1b[0m')
            print('\x1b[32;1mPick one of these:\x1b[0m')
            self.do_list('')
        else:
            if subprocess.call(['dropdb', self.dbname]) == 0:
                if subprocess.call(['createdb', self.dbname]) == 0:
                    subprocess.call( 'psql {} < {}/{}'.format(self.dbname, self.root, filename)
                                   , shell=True
                                    )
dataset/ETHPy150Open gratipay/gratipay.com/bin/snapper.py/Snapper.do_load