View Single Post
heavyt's Avatar
Posts: 708 | Thanked: 125 times | Joined on Jan 2007 @ Too Close To D.C
#122
Originally Posted by brontide
[code
else :
Dialpad.wgetcmd = Dialpad.wgetcmd + Dialpad.phonenumber
returnval = 0
# Remove any existing output file...
if os.path.isfile(wgetoutput) :
os.unlink(wgetoutput)
child_stdout, child_stdin, child_stderr = os.popen3(Dialpad.wgetcmd)
timestamp=time.asctime(time.localtime())
stderr=child_stderr.read()
[/code]

Here is the fix

Code:
                else :                                                                                                                                                                                                                                                             
                        returnval = 0                                                                                                                                                                                                                                              
                        # Remove any existing output file...                                                                                                                                                                                                                       
                        if os.path.isfile(wgetoutput) :                                                                                                                                                                                                                            
                                os.unlink(wgetoutput)                                                                                                                                                                                                                              
                        child_stdout, child_stdin, child_stderr = os.popen3(Dialpad.wgetcmd + Dialpad.phonenumber)                                                                                                                                                                 
                        timestamp=time.asctime(time.localtime())                                                                                                                                                                                                                   
                        stderr=child_stderr.read()
You see I removed the one line and modified the popen3 command. This should keep the wgetcmd string clean. I have tested this chage and it works.
Did the change, now works like a charm!