Changeset 78 for thinkgear_emulator
- Timestamp:
- 07/01/10 06:17:37 (12 years ago)
- Location:
- thinkgear_emulator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
thinkgear_emulator/puzzlebox_thinkgear_client.py
r72 r78 148 148 149 149 def connectionMade(self): 150 151 150 151 if self.DEBUG: 152 152 print "----> [ThinkGear Client] Connected to %s:%i" % \ 153 153 (self.factory.server_host, \ -
thinkgear_emulator/puzzlebox_thinkgear_server.py
r72 r78 85 85 # where 0 is perceived as a lack of that attribute 86 86 # and 100 is an excess of that attribute. 87 87 88 88 DEFAULT_BLINK_MESSAGE = {"blinkStrength": 255} 89 89 # The strength of a detected blink. This is … … 147 147 if character not in hexadecimal_characters: 148 148 is_valid = False 149 149 150 150 return(is_valid) 151 152 153 ################################################################## 154 151 152 153 ################################################################## 154 155 155 def authorize_client(self, data): 156 156 157 157 '''The client must initiate an authorization request 158 158 and the server must authorize the client before the … … 163 163 # A human-readable name identifying the client 164 164 # application. This can be a maximum of 255 characters. 165 165 166 166 if len(data['appName']) > 255: 167 167 is_authorized = False … … 169 169 170 170 return(is_authorized) 171 171 172 172 173 173 ################################################################## … … 271 271 self.client_connected = False 272 272 273 self.looping_timer.stop() 273 try: 274 self.looping_timer.stop() 275 except Exception, e: 276 if self.DEBUG: 277 print "ERROR: Failed to stop looping timer:", 278 print e 274 279 275 280
Note: See TracChangeset
for help on using the changeset viewer.