changeset 72:6031a06bb6d7

oops, statement/suffix problems
author catherine@Elli.myhome.westell.com
date Wed, 25 Jun 2008 12:53:03 -0400
parents ea1697be3d00
children 101283b63e1b
files cmd2.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/cmd2.py	Wed Jun 25 12:32:21 2008 -0400
+++ b/cmd2.py	Wed Jun 25 12:53:03 2008 -0400
@@ -265,7 +265,7 @@
 
         inputFrom  = self.input_source_finder(suffix)
         if inputFrom:
-            statement, source = inputFrom[0], inputFrom[-1]
+            source = inputFrom[-1]
             if source:
                 statement = '%s %s' % (statement, self.fileimport(statement=statement, source=source))
             else:
@@ -273,14 +273,14 @@
         
         pipeTo = self.pipe_destination_finder(suffix)
         if pipeTo:
-            statement, pipeTo = pipeTo[0], pipeTo[-1]
+            pipeTo = pipeTo[-1]
             statekeeper = Statekeeper(self, ('stdout',))               
             pipeTo = subprocess.Popen(pipeTo, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
             self.stdout = pipeTo.stdin
         else:  # can't pipe output AND send it to a file
             outputTo = self.output_destination_finder(suffix)
             if outputTo:
-                statement, destination = outputTo[0], outputTo[-1]
+                destination = outputTo[-1]
                 statekeeper = Statekeeper(self, ('stdout',))                
                 mode = ((outputTo[1][0] == '>>') and 'a') or 'w'
                 if destination: