Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -52,12 +52,12 @@ RESERVED = ['libervia']
|
|||
|
||||
class ProsodyRegisterProtocol(protocol.ProcessProtocol):
|
||||
""" Try to register an account with prosody """
|
||||
|
||||
|
||||
def __init__(self, password, deferred = None):
|
||||
self.password = password
|
||||
self.deferred = deferred
|
||||
self.data = ''
|
||||
|
||||
|
||||
def connectionMade(self):
|
||||
self.transport.write("%s\n%s" % ((self.password.encode('utf-8'),)*2))
|
||||
self.transport.closeStdin()
|
||||
|
|
@ -65,10 +65,10 @@ class ProsodyRegisterProtocol(protocol.ProcessProtocol):
|
|||
|
||||
def outReceived(self, data):
|
||||
self.data += data
|
||||
|
||||
|
||||
def errReceived(self, data):
|
||||
self.data += data
|
||||
|
||||
|
||||
def processEnded(self, reason):
|
||||
if (reason.value.exitCode == 0):
|
||||
info(_('Prosody registration success'))
|
||||
|
|
@ -97,7 +97,7 @@ class MiscAccount():
|
|||
info(_('Prosody path found: %s') % (self._prosody_path,))
|
||||
|
||||
def _registerAccount(self, email, password, profile):
|
||||
|
||||
|
||||
"""
|
||||
#Password Generation
|
||||
#_charset = [chr(i) for i in range(0x21,0x7F)] #XXX: this charset seems to have some issues with openfire
|
||||
|
|
@ -117,13 +117,13 @@ class MiscAccount():
|
|||
return d
|
||||
|
||||
def _profileRegistered(self, result, email, password, profile):
|
||||
|
||||
|
||||
#FIXME: values must be in a config file instead of hardcoded
|
||||
self.host.memory.setParam("JabberID", "%s@%s/%s" % (profile, _NEW_ACCOUNT_DOMAIN, _NEW_ACCOUNT_RESOURCE), "Connection", profile)
|
||||
self.host.memory.setParam("JabberID", "%s@%s/%s" % (profile, _NEW_ACCOUNT_DOMAIN, _NEW_ACCOUNT_RESOURCE), "Connection", profile)
|
||||
self.host.memory.setParam("Server", _NEW_ACCOUNT_SERVER, "Connection", profile)
|
||||
self.host.memory.setParam("Password", password, "Connection", profile)
|
||||
#and the account
|
||||
|
||||
|
||||
#XXX: we use "prosodyctl adduser" because "register" doesn't check conflict
|
||||
# and just change the password if the account already exists
|
||||
d = defer.Deferred()
|
||||
|
|
@ -146,7 +146,7 @@ class MiscAccount():
|
|||
def email_ko(ignore):
|
||||
#TODO: return error code to user
|
||||
error ("Failed to send email to %s" % email)
|
||||
|
||||
|
||||
body = (u"""Welcome to Libervia, a Salut à Toi project part
|
||||
|
||||
/!\\ WARNING, THIS IS ONLY A TECHNICAL DEMO, DON'T USE THIS ACCOUNT FOR ANY SERIOUS PURPOSE /!\\
|
||||
|
|
|
|||
Loading…
Reference in a new issue