summaryrefslogtreecommitdiff
path: root/poezio/fifo.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
committermathieui <mathieui@mathieui.net>2017-11-12 15:03:09 +0100
commitd55cc5872503567775f0d7a7731d6f489bf2299b (patch)
tree725f9e7b8144d36054447b3c82edfb45bda8df1d /poezio/fifo.py
parent92496db823db34f7f7fb1ab31eaef093a707c3e8 (diff)
downloadpoezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.gz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.bz2
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.tar.xz
poezio-d55cc5872503567775f0d7a7731d6f489bf2299b.zip
yapf -ir
Diffstat (limited to 'poezio/fifo.py')
-rw-r--r--poezio/fifo.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/poezio/fifo.py b/poezio/fifo.py
index 863ef228..f2615847 100644
--- a/poezio/fifo.py
+++ b/poezio/fifo.py
@@ -11,6 +11,7 @@ log = logging.getLogger(__name__)
import os
import threading
+
class OpenTrick(threading.Thread):
"""
A threaded trick to make the open for writing succeed.
@@ -22,6 +23,7 @@ class OpenTrick(threading.Thread):
(we never read anything from it, obviously)
"""
+
def __init__(self, path):
threading.Thread.__init__(self)
self.path = path
@@ -37,6 +39,7 @@ class Fifo(object):
Mode is either 'r' or 'w', just like the mode for the open()
function.
"""
+
def __init__(self, path, mode):
self.trick = None
if not os.path.exists(path):
@@ -67,5 +70,5 @@ class Fifo(object):
if self.trick:
self.trick.fd.close()
except:
- log.error('Unable to close descriptors for the fifo',
- exc_info=True)
+ log.error(
+ 'Unable to close descriptors for the fifo', exc_info=True)