Skip to content

Commit

Permalink
fixed passing config to EPP
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Nov 22, 2016
1 parent 23bcd02 commit aaddef8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion heppy/Daemon.py
Expand Up @@ -77,7 +77,7 @@ def get_login_query(self, args = {}):
return self.login_query

def connect_internal(self):
self.client = REPP(self.config)
self.client = REPP(self.config['epp'])

def connect_external(self):
try:
Expand Down
12 changes: 7 additions & 5 deletions heppy/EPP.py
Expand Up @@ -5,6 +5,7 @@
from datetime import datetime

from heppy import Net
from heppy.Config import Config

class REPP:
def __init__(self, config):
Expand All @@ -29,12 +30,13 @@ class EPP:
def __init__(self, config):
self.config = config
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.socket.connect((self.config['epp']['host'], self.config['epp']['port']))
a = config.find(self.config['epp']['keyfile'])
if ('bind' in self.config):
self.socket.bind((self.config['bind'], self.config['port']))
self.socket.connect((self.config['host'], self.config['port']))
self.ssl = ssl.wrap_socket(self.socket,
keyfile = self.config.find(self.config['epp']['keyfile']),
certfile = self.config.find(self.config['epp']['certfile']),
ca_certs = self.config.find(self.config['epp']['ca_certs']),
keyfile = Config.findFile(self.config['keyfile']),
certfile = Config.findFile(self.config['certfile']),
ca_certs = Config.findFile(self.config['ca_certs']),
)
self.greeting = self.read()
self.config['start_time'] = datetime.now().isoformat(' ')
Expand Down

0 comments on commit aaddef8

Please sign in to comment.