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

self.stdout_path = '/dev/stdout' not possible in Python 3 anymore #10

Open
spaceone opened this issue Nov 11, 2019 · 0 comments
Open

self.stdout_path = '/dev/stdout' not possible in Python 3 anymore #10

spaceone opened this issue Nov 11, 2019 · 0 comments

Comments

@spaceone
Copy link

Hello,

the following code worked with Python 2:

from daemon.runner import DaemonRunner, DaemonRunnerStopFailureError, DaemonRunnerStartFailureError
class Foo(DaemonRunner):
    def __init__(self):
        self.stdin_path = '/dev/stdin'
        self.stdout_path = '/dev/stdout'
        self.stderr_path = '/dev/stderr'
        DaemonRunner.__init__(self, self)
…

It crashes with Python 3:

    DaemonRunner.__init__(self, self)                             
  File "/usr/lib/python3/dist-packages/daemon/runner.py", line 111, in __init__
    self.daemon_context.stdout = open(app.stdout_path, 'w+t')
io.UnsupportedOperation: File or stream is not seekable.

How do I get it working again?

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