# [PATCH] fix "stg float -s FILE" for FILE != "-"

2 messages from 2009-07-17 to 2009-07-17. Participants: Hannes Eder, Catalin Marinas.
Thread: https://gitlist.dev/t/20142

## Hannes Eder, 2009-07-17 09:35

Subject: [PATCH] fix "stg float -s FILE" for FILE != "-"
Message-ID: <20090717093504.13718.78957.stgit@jazzy.zrh.corp.google.com>
URL: https://gitlist.dev/e/20090717093504.13718.78957.stgit%40jazzy.zrh.corp.google.com

```
The commit:

  commit 5a1bab1ad60688471e100e310c58c7e60d18cd80
  Author: Catalin Marinas <catalin.marinas@arm.com>
  Date:   Thu Apr 9 23:40:59 2009 +0300

      Convert "float" to the lib infrastructure

introduces a bug in "stg float -s FILE" when FILE is not equal to "-".
This patches fixes this issue.

Signed-off-by: Hannes Eder <heder@google.com>
---
 stgit/commands/float.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/stgit/commands/float.py b/stgit/commands/float.py
index e561c39..9316398 100644
--- a/stgit/commands/float.py
+++ b/stgit/commands/float.py
@@ -16,6 +16,7 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 """
 
+import re
 import sys
 from stgit.argparse import opt
 from stgit.commands import common
@@ -55,7 +56,7 @@ def func(parser, options, args):
         if options.series == '-':
             f = sys.stdin
         else:
-            f = file(args[0])
+            f = file(options.series)
 
         patches = []
         for line in f:

```

## Catalin Marinas, 2009-07-17 12:45

Subject: Re: [PATCH] fix "stg float -s FILE" for FILE != "-"
Message-ID: <1247834707.6313.5.camel@pc1117.cambridge.arm.com>
URL: https://gitlist.dev/e/1247834707.6313.5.camel%40pc1117.cambridge.arm.com
In-Reply-To: <20090717093504.13718.78957.stgit@jazzy.zrh.corp.google.com>

```
On Fri, 2009-07-17 at 11:35 +0200, Hannes Eder wrote:
> The commit:
> 
>   commit 5a1bab1ad60688471e100e310c58c7e60d18cd80
>   Author: Catalin Marinas <catalin.marinas@arm.com>
>   Date:   Thu Apr 9 23:40:59 2009 +0300
> 
>       Convert "float" to the lib infrastructure
> 
> introduces a bug in "stg float -s FILE" when FILE is not equal to "-".
> This patches fixes this issue.
> 
> Signed-off-by: Hannes Eder <heder@google.com>

Applied, thanks.

-- 
Catalin

```
