mirror of
https://github.com/onyx-and-iris/simple-recorder.git
synced 2025-07-26 22:01:54 +00:00
catch ConnectionRefusedError as well as TimeoutError
patch bump
This commit is contained in:
parent
c39b909d11
commit
b7c25525a1
@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "simple-recorder"
|
||||
version = "0.3.4"
|
||||
version = "0.3.5"
|
||||
description = "A simple OBS recorder"
|
||||
authors = [{ name = "onyx-and-iris", email = "code@onyxandiris.online" }]
|
||||
dependencies = [
|
||||
|
@ -32,5 +32,5 @@ class Directory(Command):
|
||||
f"Current recording directory: {highlight(resp.record_directory)}"
|
||||
)
|
||||
return resp.record_directory
|
||||
except TimeoutError:
|
||||
except (ConnectionRefusedError, TimeoutError):
|
||||
raise SimpleRecorderError("Failed to connect to OBS. Is it running?")
|
||||
|
@ -26,5 +26,5 @@ class Pause(Command):
|
||||
|
||||
client.pause_record()
|
||||
print("Recording paused successfully.")
|
||||
except TimeoutError:
|
||||
except (ConnectionRefusedError, TimeoutError):
|
||||
raise SimpleRecorderError("Failed to connect to OBS. Is it running?")
|
||||
|
@ -26,5 +26,5 @@ class Resume(Command):
|
||||
|
||||
client.resume_record()
|
||||
print("Recording resumed successfully.")
|
||||
except TimeoutError:
|
||||
except (ConnectionRefusedError, TimeoutError):
|
||||
raise SimpleRecorderError("Failed to connect to OBS. Is it running?")
|
||||
|
@ -45,5 +45,5 @@ class Start(Command):
|
||||
)
|
||||
client.start_record()
|
||||
print(f"Recording started with filename: {highlight(filename)}")
|
||||
except TimeoutError:
|
||||
except (ConnectionRefusedError, TimeoutError):
|
||||
raise SimpleRecorderError("Failed to connect to OBS. Is it running?")
|
||||
|
@ -25,5 +25,5 @@ class Stop(Command):
|
||||
|
||||
client.stop_record()
|
||||
print(highlight("Recording stopped successfully."))
|
||||
except TimeoutError:
|
||||
except (ConnectionRefusedError, TimeoutError):
|
||||
raise SimpleRecorderError("Failed to connect to OBS. Is it running?")
|
||||
|
Loading…
x
Reference in New Issue
Block a user