Make sure TcpOut port parameter is an integer.
authorJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Fri, 25 Jun 2010 09:46:05 +0000 (09:46 +0000)
committerJean-Michel Nirgal Vourgère <jmv@nirgal.com>
Fri, 25 Jun 2010 09:46:05 +0000 (09:46 +0000)
bin/djais/views.py
bin/inputs/peers.py

index af16964ce4df513435c097e14917299d7e9ef678..d5999f3cd7785eb8210591cb7a1c8a68f1cae7c4 100644 (file)
@@ -629,7 +629,7 @@ def logout(request):
 
 @http_authenticate(auth, 'ais')
 def sources(request):
-    sources = ( 'NMMT', 'NMKT', 'NMRW', 'NMEZ', 'NMAS', 'NMAH', 'NMBB' )
+    sources = ( 'NMMT', 'NMKT', 'NMRW', 'NMNZ', 'NMEZ', 'NMAS', 'NMAH', 'NMBB' )
     now = int(get_timestamp())
     periods = ({
         #'name_tiny': '2h',
index c9f57de27a6f6d6e8e9f1fd73fae60c3b5f5c162..96b3098a9f23f3c628942c36b75baeb0fcb1d3f0 100644 (file)
@@ -112,7 +112,9 @@ def peers_get_config():
             assert len(parameters) == 2, \
                 "SOURCES['%s']['in'] tcpout: protocol requires 2 parameters." % \
                 id4
-            SOURCES[id4]['in'] = tuple(['TcpOut'] + parameters)
+            host = parameters[0]
+            port = int(parameters[1])
+            SOURCES[id4]['in'] = ('TcpOut', host, port)
 
         else:
             logging.error(