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

Improve bad connections handling #3075

Merged

Conversation

dartvader316
Copy link
Contributor

Description

Adds a button to skip startup connections and go to offline mode to help with Bottles startup on slow and unstable connections.
Adds "Force Offline Mode" setting in preferences/General/Advanced as option to immediately start Bottles on slow and unstable connections.

Fixes #2954 problem for me

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • sudo wondershaper $NET_INTERFACE 100 100 to limit your connection speed
  • run Bottles and test.

Skip button correctly handles skipping 2 stage connection pings and downloading of repositories indexes

Copy link
Contributor

@orowith2os orowith2os left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a review code-wise from Mirko or another contributor that can. Otherwise, generally LGTM.

bottles/frontend/ui/loading.blp Outdated Show resolved Hide resolved
@orowith2os orowith2os force-pushed the improve-bad-connections-handling branch from 5927baa to e39d5bf Compare September 10, 2023 09:23
@github-actions
Copy link
Contributor

github-actions bot commented Sep 10, 2023

Pylint result on modfied files:
************* Module bottles.frontend.windows.main_window
bottles/frontend/windows/main_window.py:229:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/windows/main_window.py:230:58: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/windows/main_window.py:231:110: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/windows/main_window.py:54:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:56:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:172:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:200:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:200:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/windows/main_window.py:24:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/main_window.py:36:0: W0401: Wildcard import bottles.frontend.const (wildcard-import)
bottles/frontend/windows/main_window.py:38:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/windows/main_window.py:125:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:152:35: W0613: Unused argument 'status' (unused-argument)
bottles/frontend/windows/main_window.py:169:41: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/main_window.py:259:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:263:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:267:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:274:28: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:278:29: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:281:33: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:284:30: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:284:44: W0613: Unused argument 'view' (unused-argument)
bottles/frontend/windows/main_window.py:299:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/frontend/windows/main_window.py:320:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/windows/main_window.py:323:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/frontend/windows/main_window.py:337:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:353:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:360:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/windows/main_window.py:363:17: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:177:12: W0201: Attribute 'page_details' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:178:12: W0201: Attribute 'page_list' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:179:12: W0201: Attribute 'page_importer' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:180:12: W0201: Attribute 'page_library' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:55:0: R0904: Too many public methods (25/20) (too-many-public-methods)
bottles/frontend/windows/main_window.py:38:0: W0614: Unused import(s) APP_NAME, APP_NAME_LOWER, APP_VERSION, APP_ICON, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)
************* Module bottles.frontend.views.loading
bottles/frontend/views/loading.py:37:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/views/loading.py:50:0: C0304: Final newline missing (missing-final-newline)
bottles/frontend/views/loading.py:27:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/loading.py:29:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/loading.py:20:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
************* Module bottles.frontend.views.preferences
bottles/frontend/views/preferences.py:32:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:34:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:124:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:125:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:126:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:127:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:128:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:129:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/frontend/views/preferences.py:23:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/views/preferences.py:141:12: C0103: Variable name "w" doesn't conform to snake_case naming style (invalid-name)
bottles/frontend/views/preferences.py:159:29: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:159:37: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/views/preferences.py:165:35: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:165:43: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/views/preferences.py:168:26: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:168:34: W0613: Unused argument 'state' (unused-argument)
bottles/frontend/views/preferences.py:171:38: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:174:36: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:198:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/views/preferences.py:218:35: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/preferences.py:224:4: W0102: Dangerous default value [] as argument (dangerous-default-value)
************* Module bottles.backend.state
bottles/backend/state.py:15:4: C0103: Class constant name "ComponentsInstall" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:19:4: C0103: Class constant name "ComponentsFetching" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:20:4: C0103: Class constant name "DependenciesFetching" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:21:4: C0103: Class constant name "InstallersFetching" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:22:4: C0103: Class constant name "ComponentsOrganizing" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:23:4: C0103: Class constant name "DependenciesOrganizing" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:24:4: C0103: Class constant name "InstallersOrganizing" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:29:4: C0103: Class constant name "ManagerLocalBottlesLoaded" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:31:4: C0103: Class constant name "ForceStopNetworking" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:32:4: C0103: Class constant name "RepositoryFetched" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:33:4: C0103: Class constant name "NetworkStatusChanged" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:35:4: C0103: Class constant name "GNotification" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:36:4: C0103: Class constant name "GShowUri" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:39:4: C0103: Class constant name "TaskAdded" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:40:4: C0103: Class constant name "TaskRemoved" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:41:4: C0103: Class constant name "TaskUpdated" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/backend/state.py:50:0: R0903: Too few public methods (1/2) (too-few-public-methods)
bottles/backend/state.py:54:0: R0903: Too few public methods (1/2) (too-few-public-methods)
bottles/backend/state.py:126:16: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/state.py:211:12: C0103: Variable name "fn" doesn't conform to snake_case naming style (invalid-name)
************* Module bottles.backend.managers.repository
bottles/backend/managers/repository.py:57:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/repository.py:103:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/repository.py:107:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/repository.py:125:70: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/repository.py:62:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements)
bottles/backend/managers/repository.py:84:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/repository.py:98:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
bottles/backend/managers/repository.py:99:19: I1101: Module 'pycurl' has no 'E_OK' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/managers/repository.py:102:19: I1101: Module 'pycurl' has no 'E_ABORTED_BY_CALLBACK' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/managers/repository.py:119:20: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/repository.py:119:24: I1101: Module 'pycurl' has no 'Curl' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/managers/repository.py:129:27: I1101: Module 'pycurl' has no 'error' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/managers/repository.py:129:20: C0103: Variable name "e" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/repository.py:147:12: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/repository.py:34:0: R0903: Too few public methods (1/2) (too-few-public-methods)
************* Module bottles.backend.managers.manager
bottles/backend/managers/manager.py:117:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/manager.py:120:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/manager.py:136:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/managers/manager.py:1:0: C0302: Too many lines in module (1576/1000) (too-many-lines)
bottles/backend/managers/manager.py:412:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:743:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:830:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1484:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:1484:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/managers/manager.py:158:16: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:158:19: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:162:16: C0103: Variable name "t" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:170:8: C0103: Variable name "rv" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:175:8: W0106: Expression "self.check_dxvk(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:178:8: W0106: Expression "self.check_vkd3d(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:181:8: W0106: Expression "self.check_nvapi(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:184:8: W0106: Expression "self.check_latencyflex(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:187:8: W0106: Expression "self.check_runtimes(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:190:8: W0106: Expression "self.check_winebridge(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:193:8: W0106: Expression "self.check_runners(install_latest) or rv.set_status(False)" is assigned to nothing (expression-not-assigned)
bottles/backend/managers/manager.py:371:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:375:22: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/backend/managers/manager.py:380:31: C0207: Use version.split('\n', maxsplit=1)[0] instead (use-maxsplit-arg)
bottles/backend/managers/manager.py:400:12: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:400:16: C0103: Variable name "r" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:410:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:414:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:460:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:460:40: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:487:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:487:44: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:606:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:611:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:684:8: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:712:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:729:16: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:801:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:801:48: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:862:16: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:875:16: C0103: Variable name "p" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:884:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:885:16: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:908:12: C0103: Variable name "b" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:909:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:916:25: W1202: Use lazy % or % formatting in logging functions (logging-format-interpolation)
bottles/backend/managers/manager.py:925:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/backend/managers/manager.py:950:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:987:8: C0206: Consider iterating with .items() (consider-using-dict-items)
bottles/backend/managers/manager.py:988:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1000:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1008:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1015:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1022:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1032:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1050:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1056:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1062:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1069:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1072:29: C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
bottles/backend/managers/manager.py:1076:74: E1101: Instance of 'list' has no 'get' member (no-member)
bottles/backend/managers/manager.py:1082:4: R0913: Too many arguments (14/5) (too-many-arguments)
bottles/backend/managers/manager.py:1184:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1201:8: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1213:12: W0702: No exception type(s) specified (bare-except)
bottles/backend/managers/manager.py:1210:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1210:84: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1250:8: C0103: Variable name "rk" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1260:12: W0105: String statement has no effect (pointless-string-statement)
bottles/backend/managers/manager.py:1264:15: W0125: Using a conditional statement with a constant value (using-constant-test)
bottles/backend/managers/manager.py:1259:8: R1702: Too many nested blocks (6/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1259:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1259:8: R1702: Too many nested blocks (7/5) (too-many-nested-blocks)
bottles/backend/managers/manager.py:1344:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/backend/managers/manager.py:1344:54: C0103: Variable name "f" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/managers/manager.py:1498:8: W1510: 'subprocess.run' used without explicitly defining the value for 'check'. (subprocess-run-check)
bottles/backend/managers/manager.py:1537:4: R0913: Too many arguments (7/5) (too-many-arguments)
bottles/backend/managers/manager.py:77:0: R0904: Too many public methods (24/20) (too-many-public-methods)
************* Module bottles.backend.utils.connection
bottles/backend/utils/connection.py:84:62: C0303: Trailing whitespace (trailing-whitespace)
bottles/backend/utils/connection.py:80:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
bottles/backend/utils/connection.py:61:8: R1705: Unnecessary "else" after "return", remove the "else" and de-indent the code inside it (no-else-return)
bottles/backend/utils/connection.py:62:19: I1101: Module 'pycurl' has no 'E_OK' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/utils/connection.py:65:19: I1101: Module 'pycurl' has no 'E_ABORTED_BY_CALLBACK' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/utils/connection.py:92:15: W0718: Catching too general exception Exception (broad-exception-caught)
bottles/backend/utils/connection.py:79:12: C0103: Variable name "c" doesn't conform to snake_case naming style (invalid-name)
bottles/backend/utils/connection.py:79:16: I1101: Module 'pycurl' has no 'Curl' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/utils/connection.py:87:25: I1101: Module 'pycurl' has no 'HTTP_CODE' member, but source is unavailable. Consider adding this module to extension-pkg-allow-list if you want to perform analysis based on run-time introspection of living objects. (c-extension-no-member)
bottles/backend/utils/connection.py:88:16: W0719: Raising too general exception: Exception (broad-exception-raised)
bottles/backend/utils/connection.py:104:12: W0150: return statement in finally block may swallow exception (lost-exception)

@orowith2os orowith2os force-pushed the improve-bad-connections-handling branch from e39d5bf to fe98da9 Compare September 14, 2023 17:11
@orowith2os
Copy link
Contributor

I will see if I can test this myself later and land it for the next Bottles release.

@koplo199 you've been pretty active recently, care to give it a review?

@fab-sonarqube
Copy link

fab-sonarqube bot commented Sep 14, 2023

Copy link
Member

@mirkobrombin mirkobrombin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't test but the code looks good to me

@Perkolator
Copy link

Adds a button to skip startup connections and go to offline mode

Does this only affect Bottles itself (or just startup of Bottles), or does this cut ALL internet traffic, even from all bottles and programs run in them?

The wording of the setting in the preferences ("Force disable any network activity even with available network connection") seems to indicate that ALL traffic is stopped.

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

Successfully merging this pull request may close these issues.

[Request]: Make packages update in startup optional
4 participants