diff options
-rw-r--r-- | layman/api.py | 11 |
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 |