]> git.treefish.org Git - mtxbot.git/blobdiff - src/mtxbot.py
fixing fifo path issue
[mtxbot.git] / src / mtxbot.py
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