UnboundLocalError: local variable 'result' referenced before assignment

means that you try to use result variable but it does not exist

simply do xmame -V

xmame (x11) version 0.101 (Nov  7 2005) for me

so version 101,

edit /usr/lib/python2.4/site-packages/freevo/games/mame_cache.py
line near 272:

this_re = re.compile( ".*version\s+(\d+)\.(\d+)\s+" )
    for line in verinfo.readlines() :
        if this_re.match( line ) :
            result = int( this_re.match( line ).group( 2 ) )
    verinfo.close()

the regexp is false , I hadn't time and motivation to correct that , I simply add result=101 under this_re = re.compile...

to pass the referenced before assignment*

and I add the same line under result = int( this_re.match( line ).group( 2 ) ) in order to have the right result


    this_re = re.compile( ".*version\s+(\d+)\.(\d+)\s+" )
    result = 101

    for line in verinfo.readlines() :
        if this_re.match( line ) :
            result = int( this_re.match( line ).group( 2 ) )
            result = 101
    verinfo.close()


and now , that's run whitout matters
of course I'll have to change the value of result when future release of xmame comes


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to