File tree 2 files changed +2
-4
lines changed 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change 7
7
from django .utils .translation import gettext_lazy as _
8
8
9
9
from readthedocs .builds .constants import EXTERNAL
10
+ from readthedocs .core .utils .filesystem import safe_open
10
11
from readthedocs .doc_builder .config import load_yaml_config
11
12
from readthedocs .doc_builder .exceptions import BuildUserError
12
13
from readthedocs .doc_builder .loader import get_builder_class
@@ -643,7 +644,7 @@ def store_readthedocs_build_yaml(self):
643
644
return
644
645
645
646
try :
646
- with open (yaml_path , "r" ) as f :
647
+ with safe_open (yaml_path , "r" ) as f :
647
648
data = yaml .safe_load (f )
648
649
except Exception :
649
650
# NOTE: skip this work for now until we decide whether or not this
Original file line number Diff line number Diff line change @@ -26,12 +26,9 @@ def get(self, request):
26
26
unresolved_domain = request .unresolved_domain
27
27
project = unresolved_domain .project
28
28
29
- # TODO: why the UnresolvedURL object is not injected in the `request` by the middleware.
30
- # Is is fine to calculate it here?
31
29
unresolved_url = unresolver .unresolve_url (url )
32
30
version = unresolved_url .version
33
31
34
- # TODO: use Referrer header or GET arguments for Version / Build
35
32
project .get_default_version ()
36
33
build = version .builds .last ()
37
34
You can’t perform that action at this time.
0 commit comments