Skip to content

Commit

Permalink
fix: EnvironmentException being thrown when importing hyprpy
Browse files Browse the repository at this point in the history
  • Loading branch information
ulinja committed Dec 17, 2024
1 parent 2f97215 commit 2058e95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hyprpy/components/instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ class Instance:
:seealso: :ref:`Components: The Instance <guide-instance>`
"""

def __init__(self, signature: str = shell.get_env_var_or_fail('HYPRLAND_INSTANCE_SIGNATURE')):
def __init__(self, signature: str | None = None):
if signature is None:
signature = shell.get_env_var_or_fail('HYPRLAND_INSTANCE_SIGNATURE')
data = InstanceData(signature=signature)

#: `Instance signature <https://wiki.hyprland.org/IPC/#hyprland-instance-signature-his>`_ of the Hyprland instance.
Expand Down

0 comments on commit 2058e95

Please sign in to comment.