Feature 19962

Please review the changes for ticket 19962
This piece of code was written before and in many parts of the file it's use eval.
I decide to not refactor because I don't understand enough that function.


On Monday, 16 June 2014, 19:16, Ștefan Daniel Mihăilă <notifications@github.com> wrote:
 


In Products/Reportek/QARepository.py:
> @@ -178,7 +184,9 @@ def canRunQAOnFiles(self, files):
>                  if l_qa_app:
>                      try:
>                          l_server = xmlrpclib.ServerProxy(l_server_url)
> -                        l_tmp = eval('l_server.%s.listQAScripts(\'%s\')' %(l_remote_server, l_file.xml_schema_location))
> +                        l_tmp = eval('l_server.%s.listQAScripts(\'%s\')'
> +                                     %(l_remote_server,
> +                                       l_file.xml_schema_location)) 
I think eval is ugly and unnecessary here and you should've used getattr instead, something like:
rpc = getattr(l_server, 'l_remote_server').listQAScripts l_tmp = rpc(l_file.xml_schema_location) 
—
Reply to this email directly or view it on GitHub.