mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Catch OSError when source code is not available (#2469)
* Catch OSError when source code is not available * update changelog with reference to fixed bug
This commit is contained in:
@@ -36,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Fixed `!important` not applying to `overflow` https://github.com/Textualize/textual/issues/2420
|
- Fixed `!important` not applying to `overflow` https://github.com/Textualize/textual/issues/2420
|
||||||
- Fixed `!important` not applying to `scrollbar-size` https://github.com/Textualize/textual/issues/2420
|
- Fixed `!important` not applying to `scrollbar-size` https://github.com/Textualize/textual/issues/2420
|
||||||
- Fixed `outline-right` not being recognised https://github.com/Textualize/textual/issues/2446
|
- Fixed `outline-right` not being recognised https://github.com/Textualize/textual/issues/2446
|
||||||
|
- Fixed OSError when a file system is not available https://github.com/Textualize/textual/issues/2468
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
|||||||
@@ -1660,7 +1660,7 @@ class App(Generic[ReturnType], DOMNode):
|
|||||||
app_css_path = (
|
app_css_path = (
|
||||||
f"{inspect.getfile(self.__class__)}:{self.__class__.__name__}"
|
f"{inspect.getfile(self.__class__)}:{self.__class__.__name__}"
|
||||||
)
|
)
|
||||||
except TypeError:
|
except (TypeError, OSError):
|
||||||
app_css_path = f"{self.__class__.__name__}"
|
app_css_path = f"{self.__class__.__name__}"
|
||||||
self.stylesheet.add_source(
|
self.stylesheet.add_source(
|
||||||
self.CSS, path=app_css_path, is_default_css=False
|
self.CSS, path=app_css_path, is_default_css=False
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ class DOMNode(MessagePump):
|
|||||||
"""Get a path to the DOM Node"""
|
"""Get a path to the DOM Node"""
|
||||||
try:
|
try:
|
||||||
return f"{getfile(base)}:{base.__name__}"
|
return f"{getfile(base)}:{base.__name__}"
|
||||||
except TypeError:
|
except (TypeError, OSError):
|
||||||
return f"{base.__name__}"
|
return f"{base.__name__}"
|
||||||
|
|
||||||
for tie_breaker, base in enumerate(self._node_bases):
|
for tie_breaker, base in enumerate(self._node_bases):
|
||||||
|
|||||||
Reference in New Issue
Block a user