def pg_wait(self):
retries = <NUM_LIT:10><EOL>while retries:<EOL><INDENT>retries = retries - <NUM_LIT:1><EOL>try:<EOL><INDENT>self._run(["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", self.name])<EOL><DEDENT>except subprocess.CalledProcessError:<EOL><INDENT>time.sleep(<NUM_LIT:5>)<EOL>if not retries:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Wait for the DB to be fired up.