Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 747513 Details for
Bug 820860
games-util/lutris-0.5.9.1 Patch to fix python bug in Wine games runner
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
fix python bug in Wine games runner
wine.patch (text/plain), 3.84 KB, created by
Pavol Cvengros
on 2021-10-30 17:38:28 UTC
(
hide
)
Description:
fix python bug in Wine games runner
Filename:
MIME Type:
Creator:
Pavol Cvengros
Created:
2021-10-30 17:38:28 UTC
Size:
3.84 KB
patch
obsolete
>From e923ecf8eab9242d4a3be461438cd50966868d2c Mon Sep 17 00:00:00 2001 >From: Rachmadani Haryono <foreturiga@gmail.com> >Date: Thu, 28 Oct 2021 07:15:17 +0800 >Subject: [PATCH 1/4] fix: dev: lowercase when wine_version not None > >--- > lutris/util/wine/wine.py | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/lutris/util/wine/wine.py b/lutris/util/wine/wine.py >index 9e22e68a6..60f58a396 100644 >--- a/lutris/util/wine/wine.py >+++ b/lutris/util/wine/wine.py >@@ -290,7 +290,9 @@ def is_version_esync(path): > for esync_version in esync_compatible_versions: > if esync_version in version_prefix or esync_version in version_suffix: > return True >- wine_version = get_wine_version(path).lower() >+ wine_version = get_wine_version(path) >+ if wine_version is not None: >+ wine_version = wine_version.lower() > return "esync" in wine_version or "staging" in wine_version > > > >From 0546469a06619072ec1ca9d89f73eb8cc31b0014 Mon Sep 17 00:00:00 2001 >From: Rachmadani Haryono <foreturiga@gmail.com> >Date: Thu, 28 Oct 2021 08:07:04 +0800 >Subject: [PATCH 2/4] fix: dev: handle None val on is_version_fsync > >--- > lutris/util/wine/wine.py | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/lutris/util/wine/wine.py b/lutris/util/wine/wine.py >index 60f58a396..95e27ae2f 100644 >--- a/lutris/util/wine/wine.py >+++ b/lutris/util/wine/wine.py >@@ -315,7 +315,10 @@ def is_version_fsync(path): > for fsync_version in fsync_compatible_versions: > if fsync_version in version_prefix or fsync_version in version_suffix: > return True >- return "fsync" in get_wine_version(path).lower() >+ wine_version = get_wine_version(path) >+ if wine_version is not None: >+ return "fsync" in wine_version.lower() >+ return False > > > def get_real_executable(windows_executable, working_dir=None): > >From 6f3fbdd97b0639efc7643dc42a14fd1bfee1c3f3 Mon Sep 17 00:00:00 2001 >From: Rachmadani Haryono <foreturiga@gmail.com> >Date: Thu, 28 Oct 2021 08:30:36 +0800 >Subject: [PATCH 3/4] fix: dev: handle TypeError > >--- > lutris/util/wine/wine.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/lutris/util/wine/wine.py b/lutris/util/wine/wine.py >index 95e27ae2f..d0a1df4db 100644 >--- a/lutris/util/wine/wine.py >+++ b/lutris/util/wine/wine.py >@@ -293,7 +293,8 @@ def is_version_esync(path): > wine_version = get_wine_version(path) > if wine_version is not None: > wine_version = wine_version.lower() >- return "esync" in wine_version or "staging" in wine_version >+ return "esync" in wine_version or "staging" in wine_version >+ return False > > > def is_version_fsync(path): > >From 1547e378b0f962ce935f4b12340222c20df76a06 Mon Sep 17 00:00:00 2001 >From: rachmadani haryono <rachmadaniHaryono@users.noreply.github.com> >Date: Fri, 29 Oct 2021 04:57:47 +0800 >Subject: [PATCH 4/4] Apply suggestions from code review > >Co-authored-by: Alexandru Rudi <alexander.ravenheart@gmail.com> >--- > lutris/util/wine/wine.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/lutris/util/wine/wine.py b/lutris/util/wine/wine.py >index d0a1df4db..58733dcf2 100644 >--- a/lutris/util/wine/wine.py >+++ b/lutris/util/wine/wine.py >@@ -291,7 +291,7 @@ def is_version_esync(path): > if esync_version in version_prefix or esync_version in version_suffix: > return True > wine_version = get_wine_version(path) >- if wine_version is not None: >+ if wine_version: > wine_version = wine_version.lower() > return "esync" in wine_version or "staging" in wine_version > return False >@@ -317,7 +317,7 @@ def is_version_fsync(path): > if fsync_version in version_prefix or fsync_version in version_suffix: > return True > wine_version = get_wine_version(path) >- if wine_version is not None: >+ if wine_version: > return "fsync" in wine_version.lower() > return False
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 820860
: 747513