当前位置: 首页>>代码示例>>Python>>正文


Python ConchUser.__init__方法代码示例

本文整理汇总了Python中twisted.conch.avatar.ConchUser.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ConchUser.__init__方法的具体用法?Python ConchUser.__init__怎么用?Python ConchUser.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twisted.conch.avatar.ConchUser的用法示例。


在下文中一共展示了ConchUser.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, avatarId):
     assert self.protocolFactory is not None, (
         "When subclassing SSHBaseAvatar, set the "
         "`protocolFactory` attribute to a protocol factory`.  "
         "E.g. `SSHDemoProtocolFactory`")
     ConchUser.__init__(self)
     self.avatarId = avatarId
     self.channelLookup.update({'session': SSHSession})
开发者ID:cwaldbieser,项目名称:txsshadmin,代码行数:10,代码来源:cred_base.py

示例2: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
    def __init__(self, username, root):
        ConchUser.__init__(self)
        self.username = username
        self.filesystem = pathutils.FileSystem(root)

        self.listeners = {}  # dict mapping (interface, port) -> listener
        self.channelLookup.update(
                {"session": session.SSHSession})
        self.subsystemLookup.update(
                {"sftp": FileTransferServer})
开发者ID:Almad,项目名称:twisted,代码行数:12,代码来源:sftp.py

示例3: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
    def __init__(self, siteId, cwd, uid):
        ConchUser.__init__(self)

        # Allow the user to open a channel of type session.  This implementation
        # will look up the ISession adapter for this site and use the resulting
        # object to authorize any SSH actions.
        self.channelLookup['session'] = SSHSession

        self.siteId = siteId
        self.cwd = cwd
        self.uid = uid
开发者ID:exarkun,项目名称:Pantheon-SSH,代码行数:13,代码来源:realm.py

示例4: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, username, authnz, vcs_config):
     ConchUser.__init__(self)
     self.username = username
     self.authnz = authnz
     self.vcs_config = vcs_config
     self.channelLookup.update({"session": VCSSession})
     self.shell = {}
     # Find git-shell path.
     # Adapted from http://bugs.python.org/file15381/shutil_which.patch
     self.path = os.environ.get("PATH", os.defpath)
     self.shell['git'] = self._shells_find('git-shell')
     # self.shell['hd'] = self._shells_find('hg')
     self.shell['hg'] = '/usr/local/bin/hg'
开发者ID:PushAMP,项目名称:vcsserver,代码行数:15,代码来源:vcssshd.py

示例5: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
    def __init__(self, username):
        ConchUser.__init__(self)
        self.username = username
        self.pwdData = pwd.getpwnam(self.username)
        l = [self.pwdData[3]]
        for groupname, password, gid, userlist in grp.getgrall():
            if username in userlist:
                l.append(gid)
        self.otherGroups = l
        self.listeners = {}  # Dict mapping (interface, port) -> listener
        self.channelLookup.update(
                {"session": session.SSHSession,
                 "direct-tcpip": forwarding.openConnectForwardingClient})

        self.subsystemLookup.update(
                {"sftp": filetransfer.FileTransferServer})
开发者ID:BarnetteME1,项目名称:indeed_scraper,代码行数:18,代码来源:unix.py

示例6: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, settings, username, api_key):
     ConchUser.__init__(self)
     self.settings = settings
     self.username = username
     self.api_key = api_key
     self.channelLookup['session'] = SSHSession
开发者ID:hadoukn,项目名称:hadoukn-git-server,代码行数:8,代码来源:user.py

示例7: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, username, meta):
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({"session": SSHSession})
     self.meta = meta
开发者ID:twistor,项目名称:Drupal.org-Git-Daemons,代码行数:7,代码来源:drupalGitSSHDaemon.py

示例8: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, username):
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({"session": GitProcessProtocolSession})
开发者ID:stephrdev,项目名称:brigitte,代码行数:6,代码来源:server.py

示例9: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, key):
     ConchUser.__init__(self)
     # django, authentication model instance for logged in avatar
     self.user = key.user
     self.project = key.project
     self.channelLookup['session'] = GatewaySession
开发者ID:emil2k,项目名称:joltem,代码行数:8,代码来源:auth.py

示例10: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, username, datapath):
     ConchUser.__init__(self)
     self.username = username
     self.datapath = datapath
     self.channelLookup["session"] = SSHSession
开发者ID:bhuztez,项目名称:gitto,代码行数:7,代码来源:session.py

示例11: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, avatarId):
     ConchUser.__init__(self)
     self.email, self.pydas, self.url = avatarId
     self.channelLookup['session'] = SSHSession
     self.subsystemLookup.update(
             {'sftp': MidasFileTransferServer})
开发者ID:midasplatform,项目名称:midasftpserver,代码行数:8,代码来源:authentication.py

示例12: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, root=None):
     ConchUser.__init__(self)
     self.channelLookup["session"] = ShelllessSession
开发者ID:cyli,项目名称:ess,代码行数:5,代码来源:shelless.py

示例13: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup.update({ 'session': SSHSession })
开发者ID:h4v1nfun,项目名称:painload,代码行数:5,代码来源:test-server.py

示例14: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self, original, username):
     components.Adapter.__init__(self, original)
     ConchUser.__init__(self)
     self.username = username
     self.channelLookup.update({'session': FixedSSHSession})
     self.subsystemLookup.update({'sftp': FileTransferServer})
开发者ID:UfSoft,项目名称:SSHg,代码行数:8,代码来源:avatars.py

示例15: __init__

# 需要导入模块: from twisted.conch.avatar import ConchUser [as 别名]
# 或者: from twisted.conch.avatar.ConchUser import __init__ [as 别名]
 def __init__(self):
     ConchUser.__init__(self)
     self.channelLookup['session'] = SSHSession
开发者ID:Architektor,项目名称:PySnip,代码行数:5,代码来源:test_conch.py


注:本文中的twisted.conch.avatar.ConchUser.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。