1. Michał Górny
  2. smart-live-rebuild


Michał Górny  committed ad5659e

Output final result status even with --quiet.

  • Participants
  • Parent commits bed722c
  • Branches master

Comments (0)

Files changed (2)

File smartliverebuild/core.py

View file
 			subprocess.Popen(cmd, stdout=sys.stderr).wait()
 		if len(packages) < 1:
-			out.s1('No updates found')
+			out.result('No updates found')
-			out.s1('Found %s%d%s packages to rebuild.' % (out.white, len(packages), out.s1reset))
+			out.result('Found %s%d%s packages to rebuild.' % (out.white, len(packages), out.s1reset))
 		if childpid: # make sure that we leave no orphans
 			os.kill(childpid, signal.SIGTERM)

File smartliverebuild/output.py

View file
 		self.s2 = lambda x: None
 		self.s3 = lambda x: None
+	def result(self, msg):
+		""" Basically a s1 which doesn't respect --quiet. """
+		self.out('%s*** %s%s\n' % (self.s1reset, msg, self.reset))
 	def s1(self, msg):
 		self.out('%s*** %s%s\n' % (self.s1reset, msg, self.reset))
 		self._cur_header = None