Skip to content

Commit 3389023

Browse files
committed
Fix regex to categorize Runbot instances
1 parent 22e656f commit 3389023

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/connect_demo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
RUNBOT_URL = f"https://{RUNBOT_HOST}/runbot/submit?update_triggers=1&trigger_1=on&trigger_122=on"
3333
RUNBOT_REGEX = (
3434
# (<Community or Enterprise>, <URL without http>, <build number>, <Odoo version>)
35-
r"<span>(\w+) Run</span>.*?"
35+
r"<span>(\w+) Run</span>(?:(?! Run).)*?"
3636
r"href=.https?:(//(\d+)-([^.]+).runbot\d+.odoo.com/web)/database/selector."
3737
)
3838
ODOO_SERVERS = {"demo": "https://demo.odoo.com/"}
@@ -65,7 +65,7 @@ def _retrieve_servers(url=RUNBOT_URL, regex=RUNBOT_REGEX, user=DEFAULT_USER):
6565

6666

6767
def main():
68-
parser = argparse.ArgumentParser(description="Connect to runbot.odoo.com or demo.odoo.com.")
68+
parser = argparse.ArgumentParser(description=f"Connect to {RUNBOT_HOST} or demo.odoo.com.")
6969
parser.add_argument('env', nargs='?', default='demo', metavar='ENV', help='environment')
7070
parser.add_argument('-u', '--user', default=DEFAULT_USER, help='\'demo\' or \'admin\'')
7171
parser.add_argument('-v', '--verbose', default=0, action='count', help='verbose')

0 commit comments

Comments
 (0)