Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell launcher fails to launch uncompressed roms: "local variable 'precmd' referenced before assignment" #439

Open
grnassar opened this issue Jul 15, 2021 · 1 comment

Comments

@grnassar
Copy link

Trying to launch a game on Kodi Matrix without using Retroplayer fails for cases where the file isn't compressed. (Guessing compressed files work fine though I did not test that; why I think this will be clear shortly)

Kodi log shows error thrown by Python; traceback points to cmd_launcher.py, line 115 with error "local variable 'precmd' referenced before assignment".

Upon further inspection, build_cmd is being passed an empty roms array by code in base_launcher.py. Looking at commits it seems this was likely still working fine after the first refactor commit, but broke on the last one. Prior to the last commit, archivehandler's extract_archive function was getting passed all filenames, archived or not. It handled the base case with a simple initial assignment of the roms array, and then clobbered it later with any extracted files if necessary. After the April 15 commit, however, extract_archive is contingent on is_archive==true and does not run otherwise. Makes more sense that way, but the base case never got moved to be handled by the calling function.

Pretty simple fix, I think; have a pull request coming for you in just a few.

grnassar added a commit to grnassar/romcollectionbrowser that referenced this issue Jul 15, 2021
@grnassar
Copy link
Author

Pull request submitted. First time doing that with the new github app; hope I did that right!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant