Skip to content

Commit 0349687

Browse files
committed
State that some methods may raise a PermissionError
1 parent ff8af1b commit 0349687

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pgserviceparser/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ def remove_service(service_name: str, conf_file_path: Optional[Path] = None) ->
7676
Raises:
7777
ServiceFileNotFound: when the service file is not found
7878
ServiceNotFound: when the service is not found
79+
PermissionError: when the service file is read-only
7980
"""
8081
config = full_config(conf_file_path)
8182
if service_name not in config:
@@ -132,6 +133,7 @@ def write_service_setting(
132133
Raises:
133134
ServiceFileNotFound: when the service file is not found
134135
ServiceNotFound: when the service is not found
136+
PermissionError: when the service file is read-only
135137
"""
136138

137139
config = full_config(conf_file_path)
@@ -163,6 +165,7 @@ def write_service(
163165
Raises:
164166
ServiceFileNotFound: when the service file is not found
165167
ServiceNotFound: when the service is not found
168+
PermissionError: when the service file is read-only
166169
167170
Returns:
168171
existing or newly created service as dictionary

0 commit comments

Comments
 (0)