10se1ucgo / DisableWinTracking

Uses some known methods that attempt to minimize tracking in Windows 10
GNU Lesser General Public License v3.0
4.97k stars 368 forks source link

URLError is not defined #325

Closed ogamespec closed 7 years ago

ogamespec commented 7 years ago

20:09:41 INFO: Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32 20:09:41 INFO: ('Windows', 'CUT', '10', '10.0.14393', 'AMD64', 'Intel64 Family 6 Model 58 Stepping 9, GenuineIntel') 20:09:41 INFO: DisableWinTracking version 3.1.2 20:09:41 CRITICAL: Traceback (most recent call last): File "dwt.py", line 486, in File "dwt_about.py", line 172, in update_check NameError: global name 'URLError' is not defined

10se1ucgo commented 7 years ago

@Ruined1 told you xd

ogamespec commented 7 years ago

Told what?

DeeJayhX commented 7 years ago

@10se1ucgo well YOU tell ME how to fix it then lol, because according to the documentation, this is legitimate:

exception urllib2.URLError The handlers raise this exception (or derived exceptions) when they run into a problem. It is a subclass of IOError.

reason The reason for this error. It can be a message string or another exception instance (socket.error for remote URLs, OSError for local URLs).

https://docs.python.org/2/library/urllib2.html#urllib2.URLError

10se1ucgo commented 7 years ago

change except URLError to except urllib2.URLError

DeeJayhX commented 7 years ago

Yea, I figured that out lol. I figured the library the exception was defined in would by implied by the try: