From ae2e285f93912a4e138685f1f7accfe6c4a5bfd6 Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Sat, 3 Oct 2020 02:53:53 +0200 Subject: [PATCH] fixing fifo path issue --- .gitignore | 1 + src/mtxbot.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f6a9ff7..6a1e48c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /run *~ +__pycache__ diff --git a/src/mtxbot.py b/src/mtxbot.py index 0843f7d..0372ffe 100755 --- a/src/mtxbot.py +++ b/src/mtxbot.py @@ -64,10 +64,10 @@ with open(sys.argv[1]) as configFile: while not stopped: presences = [] for entry in os.listdir(config['paths']['fifodir']): - if stat.S_ISFIFO(os.stat(entry).st_mode): + fullpath = "%s/%s" % (config['paths']['fifodir'], entry) + if stat.S_ISFIFO(os.stat(fullpath).st_mode): logging.info("Creating presence for %s..." % entry) - presences.append( Presence( entry, "%s/%s" % - (config['paths']['fifodir'], entry) ) ) + presences.append( Presence(entry, fullpath) ) if len(presences) == 0: logging.error("No fifos could be found!") break -- 2.39.5