summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Dolbec <brian.dolbec@gmail.com>2011-02-19 02:43:11 -0800
committerBrian Dolbec <brian.dolbec@gmail.com>2011-02-19 02:43:11 -0800
commit7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17 (patch)
treedb471d5d2b67f4cadb6ca06522a2c1d860300074
parentbf5a704ebca23f917911c73994c708a1fa45d78d (diff)
downloadlayman-7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17.tar.gz
layman-7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17.tar.bz2
layman-7a970a992bfc1fea6c37ef96378c2fd4bfbc8b17.zip
eliminate the need to import Message, cleanup some stale comments.
-rw-r--r--layman/api.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/layman/api.py b/layman/api.py
index 63682f6..8081bcb 100644
--- a/layman/api.py
+++ b/layman/api.py
@@ -21,8 +21,6 @@ from layman.config import BareConfig
from layman.dbbase import UnknownOverlayException, UnknownOverlayMessage
from layman.db import DB, RemoteDB
#from layman.utils import path, delete_empty_directory
-#from layman.debug import OUT
-from layman.output import OUT
# give them some values for now, these are from the packagekit backend
# TODO establish some proper errors for the api.
@@ -31,11 +29,6 @@ ERROR_INTERNAL_ERROR = -2
UNKNOWN_REPO_ID = "Repo ID '%s' " + \
"is not listed in the current available overlays list"
-# In order to redirect output you need to get a Message class instance with the
-# stderr, stdout, stddebug directed to where you want.
-# eg: output = Message('layman', err=mystderr, dbg=mydebug, out=myoutput)
-# there are many more options available, refer to debug.py Message class
-
class LaymanAPI(object):
"""class to hold and run a layman instance for use by API consumer apps, guis, etc.
@@ -54,10 +47,10 @@ class LaymanAPI(object):
default is Message(module='layman') other params are defaults.
"""
- self.output = output if output else OUT
-
self.config = config if config else BareConfig(output=output)
+ self.output = self.config['output']
+
self.report_errors = report_errors
# get installed and available dbs