From d9856fa55dabe6927922a8cca08d6b1313bdf628 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 25 Feb 2014 13:38:07 +0100 Subject: m bug + add example with output listing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 3 ++- src/monitor.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/__main__.py b/src/__main__.py index 1e966ed..22973ac 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -363,6 +363,7 @@ temperatures = parser.opts['--temperature'] output = parser.opts['--output'] if output is None: output = [] +used_adhoc = any([doreset, location, gammas, rgb_brightnesses, cie_brightnesses, temperatures, output]) ## Verify option correctness a = lambda opt : 0 if parser.opts[opt] is None else len(parser.opts[opt]) @@ -429,7 +430,7 @@ else: ## Warn about ad-hoc settings if not uses_adhoc_opts: - if any([doreset, location, gammas, rgb_brightnesses, cie_brightnesses, temperatures, output]): + if used_adhoc: print('%s: warning: --configurations can only be combined with --panicgate' % sys.argv[0]) parser = None diff --git a/src/monitor.py b/src/monitor.py index f09db6d..f8a699a 100644 --- a/src/monitor.py +++ b/src/monitor.py @@ -374,7 +374,7 @@ class Output: self.name = None self.connected = False self.widthmm = None - self.heigthmm = None + self.heightmm = None self.crtc = None self.screen = None @@ -382,7 +382,7 @@ class Output: ''' Return a string representation of the instance ''' - rc = [self.name, self.connected, self.widthmm, self.heigthmm, self.crtc, self.screen] + rc = [self.name, self.connected, self.widthmm, self.heightmm, self.crtc, self.screen] rc = tuple([self.name] + list(map(lambda x : repr(x), rc[1:]))) rc = '[Name: %s, Connected: %s, Width: %s, Height: %s, CRTC: %s, Screen: %s]' % rc return rc -- cgit v1.2.3-70-g09d2