James Antill wrote:
> 'abcd '.rstrip() == 'abcd'
>
> ...I guess we could do:
>
> msg.rstrip('\n').split('\n')
>
> ...everyone prefer that?
>
I'm thinking just rstrip() without the '\n' would suffice, no?
;-)
-- Jeroen
___
Yum-devel mailing list
Y
Seth Vidal wrote:
> I like splitlines() and then checking if the last line is empty - but
>
>
> we're bikeshedding the hell out of this. :)
>
No we're not! ;-)
-- Jeroen
___
Yum-devel mailing list
Yum-devel@lists.baseurl.org
http://lists.baseurl.org
On Fri, 2010-05-21 at 15:00 -0400, Seth Vidal wrote:
> I like splitlines() and then checking if the last line is empty - but
>
Actually splitlines on it's own DTRT:
In [1]: 'a\n'.splitlines()
Out[1]: ['a']
In [2]: 'a\nb'.splitlines()
Out[2]: ['a', 'b']
...so fixed to use that (thanks Seth a
On Fri, 21 May 2010, James Antill wrote:
On Fri, 2010-05-21 at 18:29 +0200, Jeroen van Meeuwen wrote:
James Antill wrote:
IIRC because stdout is not a terminal then stdio/etc. will turn it into
"block buffered" mode. So we tend to get output like:
"warning: blah\nwarning: foo\nsomethingels
On Fri, 2010-05-21 at 18:29 +0200, Jeroen van Meeuwen wrote:
> James Antill wrote:
> > IIRC because stdout is not a terminal then stdio/etc. will turn it into
> > "block buffered" mode. So we tend to get output like:
> >
> > "warning: blah\nwarning: foo\nsomethingelse\n"
> >
> > ...and we want t
James Antill wrote:
> IIRC because stdout is not a terminal then stdio/etc. will turn it into
> "block buffered" mode. So we tend to get output like:
>
> "warning: blah\nwarning: foo\nsomethingelse\n"
>
> ...and we want those as 3 lines, in the DB. So I just did a split(), but
> that gives 4 lin
On Friday 21 May 2010, James Antill wrote:
> I guess a really want .readlines() from the string ... know how to do
> that?
If you really want the readlines() behavior:
lines = StringIO.StringIO(the_string).readlines()
But I suppose you might be looking for something like this instead:
l
On Fri, 21 May 2010, James Antill wrote:
---
utils.py |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/utils.py b/utils.py
index 0445b88..5a694e2 100644
--- a/utils.py
+++ b/utils.py
@@ -166,6 +166,14 @@ class YumUtilBase(YumBaseCli):
def doUtilConfigSetup(sel
---
utils.py |8
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/utils.py b/utils.py
index 0445b88..5a694e2 100644
--- a/utils.py
+++ b/utils.py
@@ -166,6 +166,14 @@ class YumUtilBase(YumBaseCli):
def doUtilConfigSetup(self,args =
sys.argv[1:],pluginsTypes=(plugin
On Fri, 21 May 2010, James Antill wrote:
On Fri, 2010-05-21 at 11:47 -0400, Seth Vidal wrote:
On Fri, 21 May 2010, James Antill wrote:
---
yum/history.py |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/yum/history.py b/yum/history.py
index d5a167e..eaf264c 100
On Fri, 2010-05-21 at 11:47 -0400, Seth Vidal wrote:
>
> On Fri, 21 May 2010, James Antill wrote:
>
> > ---
> > yum/history.py |7 ++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> > diff --git a/yum/history.py b/yum/history.py
> > index d5a167e..eaf264c 100644
> > --- a/yum/h
On Fri, 21 May 2010, James Antill wrote:
---
yum/history.py |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/yum/history.py b/yum/history.py
index d5a167e..eaf264c 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -507,7 +507,12 @@ class YumHistory:
cur =
On Fri, 21 May 2010, James Antill wrote:
---
yum/config.py |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/yum/config.py b/yum/config.py
index 3610b91..949751a 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -752,7 +752,7 @@ class YumConf(StartupConf):
if
---
yum/config.py |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/yum/config.py b/yum/config.py
index 3610b91..949751a 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -752,7 +752,7 @@ class YumConf(StartupConf):
if isinstance(getattr(self, attr), types.Meth
---
yum/history.py |7 ++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/yum/history.py b/yum/history.py
index d5a167e..eaf264c 100644
--- a/yum/history.py
+++ b/yum/history.py
@@ -507,7 +507,12 @@ class YumHistory:
cur = self._get_cursor()
if cur is None
15 matches
Mail list logo