Gentoo Archives: gentoo-commits

From: Brian Dolbec <brian.dolbec@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/layman:master commit in: layman/
Date: Thu, 07 Jun 2012 04:50:00
Message-Id: 1339044062.15fd9944117dcc90f0f297aac4f6fcbb7d9e2f95.dol-sen@gentoo
1 commit: 15fd9944117dcc90f0f297aac4f6fcbb7d9e2f95
2 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 7 04:41:02 2012 +0000
4 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
5 CommitDate: Thu Jun 7 04:41:02 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=15fd9944
7
8 set some sane defaults for stdout, stderr, stdin.
9
10 ---
11 layman/__init__.py | 5 +++--
12 1 files changed, 3 insertions(+), 2 deletions(-)
13
14 diff --git a/layman/__init__.py b/layman/__init__.py
15 index 9eeff49..aa4a159 100644
16 --- a/layman/__init__.py
17 +++ b/layman/__init__.py
18 @@ -5,12 +5,13 @@
19 on all gentoo repositories and overlays
20 """
21
22 +import sys
23 +
24 try:
25 from layman.api import LaymanAPI
26 from layman.config import BareConfig
27 from layman.output import Message
28 except ImportError:
29 - import sys
30 sys.stderr.write("!!! Layman API import failed.")
31
32
33 @@ -19,7 +20,7 @@ class Layman(LaymanAPI):
34 """A complete high level interface capable of performing all
35 overlay repository actions."""
36
37 - def __init__(self, stdout=None, stdin=None, stderr=None,
38 + def __init__(self, stdout=sys.stdout, stdin=sys.stdin, stderr=sys.stderr,
39 config=None, read_configfile=True, quiet=False, quietness=4,
40 verbose=False, nocolor=False, width=0
41 ):