Tuples are (slightly) more efficient for comparing if x in y. Not that it'll really matter at this scale, but it's technically better and simple to implement.
Applying to all files except theme.py, because theme.py is scary.
This fixes an apparently harmless bug in the `openurl()` function defined
in this module (it's not part of the class).
1. On `win32` lookup the user setting for opening HTTPS URLs.
2. If that doesn't look like IE or Edge...
3. Set `cls` to the value for that.
4. Now look up the 'use this command' for *that* ...
5. And if it doesn't have `iexplore` in it...
6. Use `subprocess.Popen()` to invoke that browser with the given URL.
The problem is that step 6 still tries to use `buf.value`. But `buf` is
no longer present as it was from before 5989acd0d3263e54429ff99769ff73a20476d863
changed over to `winreg`. It should be just `value` from the winreg
calls.
That exception is then caught and ignored, and it ends up just running
`webbrowser.open(url)` anyway.
To be honest, this feels like we should just make this an unconditional
call to `webbrowser.open(url)` now, given apparently no-one's complained
about it always actually using that not working for them. Given Edge is
Chrome-based now, and any supported OS should have Edge, Chrome or Firefox
(OK, maybe Safari and some others) as the HTTPS browser, I don't see this
being an issue.
This works by creating a temp file at config.app_dir and storing the
link in there, followed by directing the local browser to open the file.
HTML meta tags are then used to direct the browser to refresh to a URL
of our choosing (which is HTML escaped, just in case someone tries
something clever)
This should work everywhere, and on any browser (as the file:// format
is defined at https://tools.ietf.org/html/rfc1738 which was posted in
1994).
The URI used (`file://localhost/path`) ensures that we only ever
ask for a localhost file at our path.
The HTML format should be completely compliant with all major browsers
as well, ensuring that behaviour is consistent (assuming they support
HTML meta tags)
First pass utilising 'futurize' to do most of the work.
There's an issue with ur'\"' in l10n.py which I'm not sure how to
properly fix.
This now has errors when hitting the 'Update' button.