diff options
author | 2010-07-06 18:08:46 -0700 | |
---|---|---|
committer | 2010-07-06 18:08:46 -0700 | |
commit | 39a9e454c603fd5c2b960354ee09b39c6ecb5e6a (patch) | |
tree | 4f03b3868aa8145a4f72f923581c00f5dee93e47 /layman/overlays/overlay.py | |
parent | Add an output parameter to Message class and change the prints that weren't a... (diff) | |
download | overlord-39a9e454c603fd5c2b960354ee09b39c6ecb5e6a.tar.gz overlord-39a9e454c603fd5c2b960354ee09b39c6ecb5e6a.tar.bz2 overlord-39a9e454c603fd5c2b960354ee09b39c6ecb5e6a.zip |
Change the remaining modules to use teh config['output'] variable so re-direction is possible for all output.
Diffstat (limited to 'layman/overlays/overlay.py')
-rw-r--r-- | layman/overlays/overlay.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py index 2333d72..4036458 100644 --- a/layman/overlays/overlay.py +++ b/layman/overlays/overlay.py @@ -35,7 +35,7 @@ import xml.etree.ElementTree as ET # Python 2.5 from layman.utils import ensure_unicode -from layman.debug import OUT +#from layman.debug import OUT from layman.overlays.bzr import BzrOverlay from layman.overlays.darcs import DarcsOverlay @@ -100,6 +100,8 @@ class Overlay(object): False ''' + self.output = config['output'] + def strip_text(node): res = node.text if res is None: @@ -161,7 +163,7 @@ class Overlay(object): raise Exception('Overlay "' + self.name + '" is missing a ' '"owner.email" entry!') elif ignore == 1: - OUT.warn('Overlay "' + self.name + '" is missing a ' + self.output.warn('Overlay "' + self.name + '" is missing a ' '"owner.email" entry!', 4) @@ -176,7 +178,7 @@ class Overlay(object): raise Exception('Overlay "' + self.name + '" is missing a ' '"description" entry!') elif ignore == 1: - OUT.warn('Overlay "' + self.name + '" is missing a ' + self.output.warn('Overlay "' + self.name + '" is missing a ' '"description" entry!', 4) if 'status' in xml.attrib: @@ -279,7 +281,7 @@ class Overlay(object): self.sources = [s] break except Exception, error: - OUT.warn(str(error), 4) + self.output.warn(str(error), 4) return res def sync(self, base, quiet = False): |