Commit Graph

6 Commits

Author SHA1 Message Date
Kovid Goyal
8f85c0d167
Use bypy in update-on-ubuntu 2020-06-06 09:23:36 +05:30
Luflosi
527ff0238a
Replace all instances of EnvironmentError with OSError
According to the text just above https://docs.python.org/3/library/exceptions.html#EnvironmentError, `EnvironmentError` has been an alias of `OSError` since Python 3.3. Replacing it makes the code more consistent since `OSError` is used in other places in the code too.
2020-01-11 16:47:36 +01:00
Luflosi
5f855ce547
Use context managers to open files
Inspired by d50a6ddc1b.
2019-08-01 13:21:26 -05:00
Luflosi
2b095f720e
Use "with suppress()" to suppress python exceptions
Using
```Python
with suppress(OSError):
    os.remove('somefile.tmp')
```
instead of
```Python
try:
    os.remove('somefile.tmp')
except OSError:
    pass
```
makes the code more compact and more readable IMO.

This pattern was recommended by Raymond Hettinger, a Python Core
Developer in his talk "Transforming Code into Beautiful, Idiomatic Python" at https://www.youtube.com/watch?v=OSGv2VnC0go. The transcript is available at https://github.com/JeffPaine/beautiful_idiomatic_python
2019-06-03 12:27:43 +02:00
Kovid Goyal
1f597fd2b3
Speed up build for ubuntu and include debug symbols 2019-02-03 16:00:55 +05:30
Kovid Goyal
27887ada45
Script to easily test kitty in my Ubuntu VM 2019-02-03 15:44:18 +05:30