summaryrefslogtreecommitdiff
path: root/plugins/pipe_cmd.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2018-08-15 13:13:17 +0200
committermathieui <mathieui@mathieui.net>2018-08-15 13:13:17 +0200
commit6e13b8b73572f9c0ac9b5c683b98a475afbeab38 (patch)
tree7dae86588339a8cf144b2d98c9280f28646341a9 /plugins/pipe_cmd.py
parentd1b624753bb5371cf287cc9d86bb685593a99315 (diff)
downloadpoezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.gz
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.bz2
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.tar.xz
poezio-6e13b8b73572f9c0ac9b5c683b98a475afbeab38.zip
yapf -rip on plugins
Diffstat (limited to 'plugins/pipe_cmd.py')
-rw-r--r--plugins/pipe_cmd.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/pipe_cmd.py b/plugins/pipe_cmd.py
index 186df216..28d6f874 100644
--- a/plugins/pipe_cmd.py
+++ b/plugins/pipe_cmd.py
@@ -18,7 +18,6 @@ Configuration
"""
-
from poezio.plugin import BasePlugin
import os
import stat
@@ -29,6 +28,7 @@ log = logging.getLogger(__name__)
PIPENAME = "/tmp/poezio.fifo"
+
class Plugin(BasePlugin):
def init(self):
self.stop = False
@@ -41,7 +41,7 @@ class Plugin(BasePlugin):
if not stat.S_ISFIFO(os.stat(self.pipename).st_mode):
raise TypeError("File %s is not a fifo file" % self.pipename)
- self.fd = os.open(self.pipename, os.O_RDONLY|os.O_NONBLOCK)
+ self.fd = os.open(self.pipename, os.O_RDONLY | os.O_NONBLOCK)
self.data = b""
asyncio.get_event_loop().add_reader(self.fd, self.read_from_fifo)
@@ -52,7 +52,7 @@ class Plugin(BasePlugin):
# EOF, close the fifo. And reopen it
asyncio.get_event_loop().remove_reader(self.fd)
os.close(self.fd)
- self.fd = os.open(self.pipename, os.O_RDONLY|os.O_NONBLOCK)
+ self.fd = os.open(self.pipename, os.O_RDONLY | os.O_NONBLOCK)
asyncio.get_event_loop().add_reader(self.fd, self.read_from_fifo)
self.data = b''
else: