comparison src/server/server.py @ 473:d1565906f228

server_side: fixed some forgotten print statement
author Goffi <goffi@goffi.org>
date Tue, 10 Jun 2014 16:02:45 +0200
parents 42c8e91af048
children 6700386291f1
comparison
equal deleted inserted replaced
472:42c8e91af048 473:d1565906f228
257 type_ = "PUBLIC" if dest == [] else "GROUP" 257 type_ = "PUBLIC" if dest == [] else "GROUP"
258 258
259 if type_ in ("PUBLIC", "GROUP") and text: 259 if type_ in ("PUBLIC", "GROUP") and text:
260 if type_ == "PUBLIC": 260 if type_ == "PUBLIC":
261 #This text if for the public microblog 261 #This text if for the public microblog
262 print "sending public blog" 262 log.debug("sending public blog")
263 return self.sat_host.bridge.sendGroupBlog("PUBLIC", [], text, extra, profile) 263 return self.sat_host.bridge.sendGroupBlog("PUBLIC", [], text, extra, profile)
264 else: 264 else:
265 print "sending group blog" 265 log.debug("sending group blog")
266 dest = dest if isinstance(dest, list) else [dest] 266 dest = dest if isinstance(dest, list) else [dest]
267 return self.sat_host.bridge.sendGroupBlog("GROUP", dest, text, extra, profile) 267 return self.sat_host.bridge.sendGroupBlog("GROUP", dest, text, extra, profile)
268 else: 268 else:
269 raise Exception("Invalid data") 269 raise Exception("Invalid data")
270 270
1134 reactor.listenTCP(self.port, server.Site(RedirectToHTTPS(self.port, self.port_https_ext))) 1134 reactor.listenTCP(self.port, server.Site(RedirectToHTTPS(self.port, self.port_https_ext)))
1135 else: 1135 else:
1136 reactor.listenTCP(self.port, self.site) 1136 reactor.listenTCP(self.port, self.site)
1137 1137
1138 def stopService(self): 1138 def stopService(self):
1139 print "launching cleaning methods" 1139 log.info(_("launching cleaning methods"))
1140 for callback, args, kwargs in self._cleanup: 1140 for callback, args, kwargs in self._cleanup:
1141 callback(*args, **kwargs) 1141 callback(*args, **kwargs)
1142 self.bridge.disconnect(C.SERVICE_PROFILE) 1142 self.bridge.disconnect(C.SERVICE_PROFILE)
1143 1143
1144 def run(self): 1144 def run(self):