diff options
author | Ruined1 <ruined1@gmail.com> | 2019-01-30 00:14:42 +0300 |
---|---|---|
committer | Ruined1 <ruined1@gmail.com> | 2019-01-30 00:14:42 +0300 |
commit | 64ada018771a301e9d9d4eb0dc9f3d6890e74feb (patch) | |
tree | f3f0e3460746607eb2e99fc228cae14b3fd0a905 | |
parent | 5f13d302c0f9d33999b891c1b76c8e0e12cf9576 (diff) |
v3.2.23.2.2
A few minor patches, mostly to stop people from reporting invalid issues and to acknowledge success appropriately upon completions.
-Implemented a check for OneDrive binary so people stop reporting invalid issues #405
-Modified DiagTrack disable/remove to reflect success when it's Marked for Deletion #406
-rw-r--r-- | dwt.py | 8 | ||||
-rw-r--r-- | dwt_about.py | 2 | ||||
-rw-r--r-- | dwt_util.py | 21 |
3 files changed, 20 insertions, 11 deletions
@@ -71,9 +71,11 @@ class ConsoleDialog(wx.Dialog): class MainFrame(wx.Frame): - def __init__(self): - super(MainFrame, self).__init__(parent=wx.GetApp().GetTopWindow(), title="Disable Windows 10 Tracking", - size=(415, 245)) + def __init__(self): + super(MainFrame, self).__init__(parent=wx.GetApp().GetTopWindow(), \ + title="Disable Windows 10 Tracking", \ + size=(415,245)) + self.SetMinSize(self.GetSize()) panel = MainPanel(self) diff --git a/dwt_about.py b/dwt_about.py index fe1dd45..994e5ae 100644 --- a/dwt_about.py +++ b/dwt_about.py @@ -26,7 +26,7 @@ import wx import wx.adv import wx.lib.scrolledpanel as sp -__version__ = "3.2.1" +__version__ = "3.2.2" def about_dialog(parent): diff --git a/dwt_util.py b/dwt_util.py index 33f64f8..4ad1c6f 100644 --- a/dwt_util.py +++ b/dwt_util.py @@ -168,7 +168,9 @@ def delete_service(service): win32serviceutil.RemoveService(service) logger.info("Services: Succesfully removed service '{service}'".format(service=service)) except pywintypes.error as e: - errors = (winerror.ERROR_SERVICE_DOES_NOT_EXIST, winerror.ERROR_SERVICE_NOT_ACTIVE) + errors = (winerror.ERROR_SERVICE_DOES_NOT_EXIST, \ + winerror.ERROR_SERVICE_NOT_ACTIVE, \ + winerror.ERROR_SERVICE_MARKED_FOR_DELETE) if not any(error == e.winerror for error in errors): logger.exception("Services: Failed to remove service '{service}'".format(service=service)) @@ -262,14 +264,19 @@ def onedrive(undo): system = "SysWOW64" if is_64bit() else "System32" onedrive_setup = os.path.join(os.environ['SYSTEMROOT'], "{system}\\OneDriveSetup.exe".format(system=system)) - cmd = "{bin} /{action}".format(bin=onedrive_setup, action=action) - output = subprocess_handler(cmd) - if output[0] == -2147219823: - logger.info("OneDrive: successfully {action}ed".format(action=action)) + #Adding check if exe is there to help weed out issue submissions + #from users who have somehow previously removed the binary + if os.path.isfile(onedrive_setup): + cmd = "{bin} /{action}".format(bin=onedrive_setup, action=action) + + output = subprocess_handler(cmd) + if output[0] == -2147219813: + logger.info("OneDrive: successfully {action}ed".format(action=action)) + else: + logger.info("OneDrive: unable to {action}. Exited with code: {code} - {message}".format(action=action, code=output[0], message=output[1])) else: - logger.info("OneDrive: unable to {action}. Exited with code: {code} - {message}".format(action=action, code=output[0], message=output[1])) - + logger.info("OneDrive: Binary doesn't exist. Unable to {action}. Do not send a report for this.".format(action=action)) def set_registry(keys): mask = winreg.KEY_WOW64_64KEY | winreg.KEY_ALL_ACCESS if is_64bit() else winreg.KEY_ALL_ACCESS |