Permalink
Browse files

host and port cannot come from the ini file. what was i thinking?

  • Loading branch information...
1 parent 92d93b2 commit df833986ea1d5e9a944d9327edc9af2b4d43b2ac BuzzTroll committed Sep 2, 2010
@@ -1,5 +1,6 @@
#!/bin/bash
+# this is the only end that will be located with the nimbus service
dir=`dirname $0`
cd $dir/..
pypath=`pwd`
@@ -10,5 +11,8 @@ else
fi
# so that we pick up the ini file
export LANTORRENT_HOME=$pypath
+cd ../
+export NIMBUS_HOME=`pwd`
+source $NIMBUS_HOME/ve/bin/activate
-exec python ./pylantorrent/request.py "${@}"
+exec python $LANTORRENT_HOME/pylantorrent/request.py "${@}"
@@ -73,20 +73,11 @@ def load_settings(self, ini_file):
'error': logging.ERROR,
'critical': logging.CRITICAL}
-
s = SafeConfigParser()
s.readfp(open(ini_file, "r"))
self.pw = s.get("security", "password")
self.logfile = s.get("log", "file").replace("@LANTORRENT_HOME@", self.lt_home)
try:
- self.host = s.get("request", "host")
- except Exception, ex:
- pass
- try:
- self.port = s.getint("request", "port")
- except Exception, ex:
- pass
- try:
log_level_str = s.get("log", "level")
self.log_level = log_levels[log_level_str]
except Exception, ex:
@@ -118,15 +118,15 @@ def main(argv=sys.argv[1:]):
pylantorrent.log(logging.INFO, "enter")
- # host and port need to come from conf file
- host = pylantorrent.config.host
- port = pylantorrent.config.port
-
src_filename = argv[0]
dst_filename = argv[1]
group_id = int(argv[2])
group_count = int(argv[3])
+ host = argv[4]
+ port = int(argv[5])
+
+
# the user provides the rid. that way we know they have it to look
# things up later if needed
rid = argv[4]
@@ -1 +1 @@
-export LANTORRENT_TEST_PORTS=14055,10195,16050,21060
+export LANTORRENT_TEST_PORTS=12171,3438,28311,10259

0 comments on commit df83398

Please sign in to comment.