From: R. Steve McKown Date: Sat, 24 Jan 2015 20:00:39 +0000 (-0700) Subject: Separate output in log by a blank line X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=dispcfg.git;a=commitdiff_plain;h=041f089ce86a6e55eacee8cd96c43a4a307f293c Separate output in log by a blank line --- diff --git a/dispcfg b/dispcfg index 02f1f8d..f0cc4a2 100755 --- a/dispcfg +++ b/dispcfg @@ -23,6 +23,10 @@ class record: self.of.write(data) sys.stdout.write(data) + def fout(self, line): + data = '%s\n' % line + self.of.write(data) + def outTime(self, line): tstamp = datetime.datetime.fromtimestamp(time.time()) data = '%s %s\n' % (tstamp.strftime('%Y-%m-%d %H:%M:%S'), line) @@ -232,6 +236,7 @@ if __name__ == '__main__': subprocess.call('/usr/local/bin/setctrl') out.outTime('completed') + out.fout('') main(sys.argv)