Commits

Robin Jarry  committed a2776a6

Fixed the error "local variable 'param_value' referenced before assignment" when a parameter is missing in a parameterized query.

  • Participants
  • Parent commits 7c16c14
  • Tags clearquest-0.5

Comments (0)

Files changed (3)

File clearquest/CHANGES

 
 This file describes user-visible changes between the extension versions.
 
+Version 0.5 (2012-04-24)
+------------------------
+
+*  Fixed the error ``local variable 'param_value' referenced before assignment`` 
+   when a parameter is missing in a parameterized query.
+
 Version 0.4 (2011-12-20)
 ------------------------
 
-* user credentials are now read in ~/.sphinxcontrib and ~/sphinxcontrib
-  (this is a convenience for windows users)
+*  user credentials are now read in ~/.sphinxcontrib and ~/sphinxcontrib
+   (this is a convenience for windows users)
 
 Version 0.3 (2011-12-16)
 ------------------------
 
-* fixed IndexError when the query return nothing 
+*  fixed IndexError when the query return nothing 
 
 Version 0.2 (2011-12-14)
 ------------------------
 
-* fixed errors on columns widths resolution when some fields are NULL.
-* fixed broken tables when some columns are "not shown"
-* removed explicit dependency to "pywin32" to avoid crashes of easy_install.
+*  fixed errors on columns widths resolution when some fields are NULL.
+*  fixed broken tables when some columns are "not shown"
+*  removed explicit dependency to "pywin32" to avoid crashes of easy_install.
 
 Version 0.1 (2011-12-13)
 ------------------------
 
-* Initial version.
+*  Initial version.

File clearquest/setup.py

 
 setup(
     name='sphinxcontrib-clearquest',
-    version='0.4',
+    version='0.5',
     url='http://bitbucket.org/birkenfeld/sphinx-contrib',
     download_url='http://pypi.python.org/pypi/sphinxcontrib-clearquest',
     license='BSD',

File clearquest/sphinxcontrib/clearquest/connection.py

                 param_name = resultSet.GetParamLabel(i)
                 try:
                     param_value = parameters[param_name]
+                    resultSet.AddParamValue(i, param_value)
                 except:
                     errors.append("'%s'" % param_name)
-                resultSet.AddParamValue(i, param_value)
 
             if errors:
                 params = ", ".join(errors)