Beispiel #1
0
 def run(cmd):
     """ Execute shell command in detached mdoe."""
     proc = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True)
     ret, err = proc.communicate()
     if err:
         # ignore warnings in error stream
         if "Warning" in err:
             CLogger.warning(err.strip())
             return err
         raise PiBlinkerError(err)
     else:
         return ret
Beispiel #2
0
    def warning(self, *args):
        """ Print a debug message and notify the user with the LED."""

        CLogger.warning(args[-1])