diff --git a/.github/workflows/centos-stream8.yml b/.github/workflows/centos-stream8.yml index ea2244e..ad10ee2 100644 --- a/.github/workflows/centos-stream8.yml +++ b/.github/workflows/centos-stream8.yml @@ -10,7 +10,7 @@ jobs: DUFFYY_SSH_PRIVATE_KEY: ${{ secrets.DUFFYY_SSH_PRIVATE_KEY }} - run: chmod 600 /tmp/id_centos_stream - run: sudo python3 -m pip install pydantic==1.10.10 duffy fabric httpx - - run: python3 t_functional_duffy_runner/src/__main__.py --arch=x86 --release=centos-8s --sshkey=/tmp/id_centos_stream --path=./ + - run: python3 t_functional_duffy_runner/src/__main__.py --arch=x86 --release=centos-8s --sshkey=/tmp/id_centos_stream env: DUFFY_AUTH_NAME: ${{ secrets.DUFFY_AUTH_NAME }} DUFFY_AUTH_KEY: ${{secrets.DUFFY_AUTH_KEY}} @@ -25,7 +25,7 @@ jobs: DUFFYY_SSH_PRIVATE_KEY: ${{ secrets.DUFFYY_SSH_PRIVATE_KEY }} - run: chmod 600 /tmp/id_centos_stream - run: sudo python3 -m pip install pydantic==1.10.10 duffy fabric httpx - - run: python3 t_functional_duffy_runner/src/__main__.py --arch=x86 --release=centos-9s --sshkey=/tmp/id_centos_stream --path=./ + - run: python3 t_functional_duffy_runner/src/__main__.py --arch=x86 --release=centos-9s --sshkey=/tmp/id_centos_stream env: DUFFY_AUTH_NAME: ${{ secrets.DUFFY_AUTH_NAME }} DUFFY_AUTH_KEY: ${{secrets.DUFFY_AUTH_KEY}} diff --git a/t_functional_duffy_runner/src/__main__.py b/t_functional_duffy_runner/src/__main__.py index b3e8b90..bf295e6 100644 --- a/t_functional_duffy_runner/src/__main__.py +++ b/t_functional_duffy_runner/src/__main__.py @@ -36,8 +36,11 @@ class DuffyWrapper: def request_session(self, *query): pool = self.find_pool_name(*query) session = self.c.request_session([{"pool":pool[0], "quantity":"1"}]) - self.last_session = session - return session + if hasattr(session, 'session'): + self.last_session = session + return session + else: + raise session class TmuxWrapper: def __init__(self, host, session='default-session', private_key=None, **rest):