Skip to content

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

@spaceone

Description

@spaceone

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions