Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pystemd.run does not raise exception on collect #36

Open
aleivag opened this issue Sep 21, 2019 · 0 comments
Open

pystemd.run does not raise exception on collect #36

aleivag opened this issue Sep 21, 2019 · 0 comments

Comments

@aleivag
Copy link
Collaborator

aleivag commented Sep 21, 2019

collect stop a pystemd.run from raising exception

In [15]: pystemd.run( 
    ...:     ['/bin/false'], 
    ...:     stdin=sys.stdin, stdout=sys.stdout,  
    ...:     wait=True, pty=True, collect=False, 
    ...:     name='mys.service', raise_on_fail=True,  
    ...: )                                                                                                          
---------------------------------------------------------------------------
PystemdRunError                           Traceback (most recent call last)
/home/aleivag/code/asg-lt/lt.py in <module>
      3     stdin=sys.stdin, stdout=sys.stdout,
      4     wait=True, pty=True, collect=False,
----> 5     name='mys.service', raise_on_fail=True,
      6 )

while

In [18]: pystemd.run( 
    ...:     ['/bin/false'], 
    ...:     stdin=sys.stdin, stdout=sys.stdout,  
    ...:     wait=True, pty=True, collect=True, 
    ...:     name='mys.service', raise_on_fail=True,  
    ...: )                                                                                                          
Out[18]: <pystemd.systemd1.unit.Unit at 0x7f703479ddd0>

In [19]:  

and both should raise exception

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant