func/utils.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 330df008b384acb270ce5dbe8099f4edee384330
Author: S.ÃaÄlar Onur <[email protected]>
Date: Fri Aug 27 15:26:19 2010 -0400
start with None assigned ip variable to solve following;
2010-08-22 04:18:27,861 - INFO - Exception occured: <type
'exceptions.UnboundLocalError'>
2010-08-22 04:18:27,861 - INFO - Exception value: local variable 'ip'
referenced before assignment
2010-08-22 04:18:27,861 - INFO - Exception Info:
File "/usr/bin/funcd", line 23, in <module>
server.main(sys.argv)
File "/usr/lib/python2.5/site-packages/func/minion/server.py", line 377,
in main
hn = func_utils.get_hostname_by_route()
File "/usr/lib/python2.5/site-packages/func/utils.py", line 136, in
get_hostname_by_route
if ip != "127.0.0.1" and hostname is not None:
diff --git a/func/utils.py b/func/utils.py
index fe0c9da..129e9ab 100644
--- a/func/utils.py
+++ b/func/utils.py
@@ -81,7 +81,8 @@ def get_hostname_by_route():
# FIXME: this code ignores http proxies (which granted, we don't
# support elsewhere either.
hostname = None
-
+ ip = None
+
minion_config_file = '/etc/func/minion.conf'
minion_config = read_config(minion_config_file, FuncdConfig)
_______________________________________________
Func-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/func-list