Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
Nuovo sito
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
16
Issues
16
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gruppo Web
Nuovo sito
Commits
297ac387
Commit
297ac387
authored
Mar 25, 2020
by
Mattia Rizzolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent some YAMLLoadWarning by using safe_load() instead of load()
Signed-off-by:
Mattia Rizzolo
<
mapreri@ubuntu.com
>
parent
82131a0b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
uitwww/auth.py
uitwww/auth.py
+1
-1
uitwww/navbar.py
uitwww/navbar.py
+1
-1
uitwww/redirects.py
uitwww/redirects.py
+1
-1
No files found.
uitwww/auth.py
View file @
297ac387
...
@@ -149,7 +149,7 @@ class Permissions:
...
@@ -149,7 +149,7 @@ class Permissions:
def
__init__
(
self
):
def
__init__
(
self
):
raw
=
pkg_resources
.
resource_string
(
"uitwww"
,
"data/permissions.yml"
)
raw
=
pkg_resources
.
resource_string
(
"uitwww"
,
"data/permissions.yml"
)
self
.
config
=
yaml
.
load
(
raw
.
decode
(
"utf-8"
))
self
.
config
=
yaml
.
safe_
load
(
raw
.
decode
(
"utf-8"
))
def
allowed_teams
(
self
):
def
allowed_teams
(
self
):
"""Return a list of teams allowed to log in"""
"""Return a list of teams allowed to log in"""
...
...
uitwww/navbar.py
View file @
297ac387
...
@@ -56,7 +56,7 @@ class Navbar:
...
@@ -56,7 +56,7 @@ class Navbar:
def
install
(
self
,
app
):
def
install
(
self
,
app
):
"""Install this navbar on the app"""
"""Install this navbar on the app"""
raw
=
pkg_resources
.
resource_string
(
"uitwww"
,
"data/navbar.yml"
)
raw
=
pkg_resources
.
resource_string
(
"uitwww"
,
"data/navbar.yml"
)
config
=
yaml
.
load
(
raw
.
decode
(
"utf-8"
))
config
=
yaml
.
safe_
load
(
raw
.
decode
(
"utf-8"
))
self
.
_prepare_navbar_cache
(
config
,
[])
self
.
_prepare_navbar_cache
(
config
,
[])
# Add the _navbars variable to the templates
# Add the _navbars variable to the templates
...
...
uitwww/redirects.py
View file @
297ac387
...
@@ -23,7 +23,7 @@ import hashlib
...
@@ -23,7 +23,7 @@ import hashlib
def
prepare_blueprint
(
app
):
def
prepare_blueprint
(
app
):
"""Prepare a blueprint containing all the redirects"""
"""Prepare a blueprint containing all the redirects"""
raw
=
pkg_resources
.
resource_string
(
"uitwww"
,
"data/redirects.yml"
)
raw
=
pkg_resources
.
resource_string
(
"uitwww"
,
"data/redirects.yml"
)
config
=
yaml
.
load
(
raw
.
decode
(
"utf-8"
))
config
=
yaml
.
safe_
load
(
raw
.
decode
(
"utf-8"
))
bp
=
flask
.
Blueprint
(
"redirects"
,
__name__
)
bp
=
flask
.
Blueprint
(
"redirects"
,
__name__
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment