Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
3-manifolds
GitHub Repository: 3-manifolds/Sage_macOS
Path: blob/main/Sage_framework/files/patches/sagedoc.patch
242 views
1
--- ../repo/sage/src/sage/misc/sagedoc.py 2023-03-30 15:47:17
2
+++ sagedoc.py 2022-12-09 14:04:52
3
@@ -1577,14 +1576,14 @@
4
"""
5
url = self._base_url + os.path.join(name, "index.html")
6
path = os.path.join(self._base_path, name, "index.html")
7
- if not os.path.exists(path):
8
- raise OSError("""The document '{0}' does not exist. Please build it
9
-with 'sage -docbuild {0} html' and try again.""".format(name))
10
11
if testing:
12
return (url, path)
13
14
- os.system(browser() + " " + path)
15
+ if os.path.exists(path):
16
+ os.system(browser() + " " + path)
17
+ else:
18
+ os.system(browser() + " " + "https://doc.sagemath.org/html/en/%s/index.html"%name)
19
20
def tutorial(self):
21
"""
22
23