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
def warning(self, *args): """ Print a debug message and notify the user with the LED.""" CLogger.warning(args[-1])