From: Alexander Schmidt Date: Sat, 3 Oct 2020 00:53:53 +0000 (+0200) Subject: fixing fifo path issue X-Git-Url: http://git.treefish.org/~alex/mtxbot.git/commitdiff_plain/ae2e285f93912a4e138685f1f7accfe6c4a5bfd6?ds=sidebyside fixing fifo path issue --- 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