"Breck Beatie" <[EMAIL PROTECTED]> wrote on 05/04/2007 03:21:20 PM:

> Hello,
> 
> I stumbled across a very small bug in the deps.py file in your python
> openhpi module.  The check_ver function in that file seems to have
> a small bug that arises when a version of openhpi older than 2.6.1
> is installed on the local system.  At least on my system the python
> interpreter complains of a TypeError, that it was expecting a string,
> but found an int.
> 
> Here's a diff of my fix on the off chance that you're interested:
> --- deps.py     2007-04-23 16:51:42.000000000 -0700
> +++ new_deps.py 2007-05-04 12:11:46.000000000 -0700
> @@ -73,16 +73,16 @@
>         reqver = map(int, reqver_text.split('.'))
>         pythonver = sys.version_info[:3]
>         return check_ver(pythonver, reqver)
> 
>  def check_ver(ver, reqver):
>         if ver[0] < reqver[0]:
> -               return '.'.join(ver)
> +               return '.'.join(map(str, ver))
>         elif ver[0] == reqver[0]:
>                 if ver[1] < reqver[1]:
> -                       return '.'.join(ver)
> +                       return '.'.join(map(str, ver))
>                 elif ver[1] == reqver[1]:
>                         if ver[2] < reqver[2]:
> -                               return '.'.join(ver)
> +                               return '.'.join(map(str, ver))
> 
>         return None
> 
> 
> Thank you very much for providing the Python module.  It promises
> to make our work much easier.
> 

Thank you for reporting the bug and the fix. I will try it in the next 
couple of workdays and commit it to sourceforge. Let me know if you find 
anything else.

        --Renier

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Openhpi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openhpi-devel

Reply via email to