]> git.treefish.org Git - mtxbot.git/commitdiff
fixing fifo path issue
authorAlexander Schmidt <alex@treefish.org>
Sat, 3 Oct 2020 00:53:53 +0000 (02:53 +0200)
committerAlexander Schmidt <alex@treefish.org>
Sat, 3 Oct 2020 00:53:53 +0000 (02:53 +0200)
.gitignore
src/mtxbot.py

index f6a9ff7e9f237aaebc3139a267f530e38ad77224..6a1e48c82773e36e557f9d9c0f09f9746d5f42e0 100644 (file)
@@ -1,2 +1,3 @@
 /run
 *~
+__pycache__
index 0843f7d2184439e5e2a42df31bdff46ed7da4ed2..0372ffe5c521dd325886cda75fd61cc814886011 100755 (executable)
@@ -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