mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2026-10-25 08:11:24 +00:00
This step not needed
This commit is contained in:
1 parent
d93dcf9c2a
commit
ecdd8987bb
1 file changed
+1
-8
@@ -38,16 +38,9 @@ def get_openapi_spec():
|
||||
|
||||
spec_path = os.path.join(os.path.dirname(__file__), '../../docs/api-spec.yaml')
|
||||
if not os.path.exists(spec_path):
|
||||
# Possibly for pip3 packages (will be shipped with the package)
|
||||
# Possibly for pip3 packages
|
||||
spec_path = os.path.join(os.path.dirname(__file__), '../docs/api-spec.yaml')
|
||||
|
||||
|
||||
# 3. Last resort: check if it's in the package root for pip/PyPI installations
|
||||
if not os.path.exists(spec_path):
|
||||
import changedetectionio
|
||||
package_root = os.path.dirname(os.path.dirname(changedetectionio.__file__))
|
||||
spec_path = os.path.join(package_root, 'docs/api-spec.yaml')
|
||||
|
||||
with open(spec_path, 'r') as f:
|
||||
spec_dict = yaml.safe_load(f)
|
||||
_openapi_spec = OpenAPI.from_dict(spec_dict)
|
||||
|
||||
Reference in new issue
Block a user