~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/apps/consoleservice/__init__.py

  • Committer: dcoles
  • Date: 2008-08-20 08:10:40 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:1034
Console: Refactored the code to support supplying of stdin to the console.  
Renamed and unified a few call in the module - inspect is now execute since 
stdout is written to the console.stdout file-like object rather than being 
returned as part of the call. __chat becomes split into __chat which deals with 
the low level chat protocol issues and __handle_chat which deals with console's 
own protocol.

Updated tutorial service to use these new calls. Still have to fix the 
'add_stdin' function but should be very simple now. (Just write to 
console.stdin)

Show diffs side-by-side

added added

removed removed

Lines of Context:
124
124
            # Could not decode the reply from the python-console server
125
125
            decoded_response = {"restart":
126
126
                "Communication to console process lost"}
127
 
        if "restart" in decoded_response:
 
127
        if "terminate" in decoded_response:
128
128
            response = restart_console(uid, jail_path, working_dir,
129
 
                decoded_response["restart"])
 
129
                decoded_response["terminate"])
130
130
 
131
131
    except socket.error, (enumber, estring):
132
132
        if enumber == errno.ECONNREFUSED: