# HG changeset patch # User Goffi # Date 1396262159 -7200 # Node ID 5925c9ebfcd272b97b3d91aa205b7b8640b92916 # Parent 4a577b170809885ee23a2818e9722936e6ecb59c plugin account: reverted patch abd3a75d629c diff -r 4a577b170809 -r 5925c9ebfcd2 src/plugins/plugin_misc_account.py --- a/src/plugins/plugin_misc_account.py Mon Mar 31 12:24:20 2014 +0200 +++ b/src/plugins/plugin_misc_account.py Mon Mar 31 12:35:59 2014 +0200 @@ -64,7 +64,6 @@ class ProsodyRegisterProtocol(protocol.ProcessProtocol): """ Try to register an account with prosody """ - prosody_gid = None def __init__(self, password=None, deferred=None): """ @@ -74,14 +73,6 @@ self.password = password self.deferred = deferred self.data = '' - if ProsodyRegisterProtocol.prosody_gid is None: - try: - import grp - ProsodyRegisterProtocol.prosody_gid = grp.getgrnam("prosody").gr_gid - info("prosody gid found: %s" % ProsodyRegisterProtocol.prosody_gid) - except: - warning("Can't find prosody gid") - def connectionMade(self): if self.password is None: @@ -116,7 +107,7 @@ prosody_reg = ProsodyRegisterProtocol(password, d) prosody_exe = join(plugin._prosody_path, plugin.getConfig('prosodyctl')) # TODO delete account which are not on the same host - reactor.spawnProcess(prosody_reg, prosody_exe, [prosody_exe, command, "%s@%s" % (profile, plugin.getConfig('new_account_domain'))], path=plugin._prosody_path, gid=ProsodyRegisterProtocol.prosody_gid) + reactor.spawnProcess(prosody_reg, prosody_exe, [prosody_exe, command, "%s@%s" % (profile, plugin.getConfig('new_account_domain'))], path=plugin._prosody_path) return d