Re: func/utils.py

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2010-08-27 at 19:27 +0000, caglar10ur wrote:
> func/utils.py |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> New commits:
> commit 330df008b384acb270ce5dbe8099f4edee384330
> Author: S.Çağlar Onur <caglar@xxxxxxxxxxxxxxxx>
> 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)
>  
> 


ACK - what path do you use to make this problem happen?

-sv


_______________________________________________
Func-list mailing list
Func-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/func-list



[Index of Archives]     [Fedora Users]     [Linux Networking]     [Fedora Legacy List]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux