Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
b9c60e42
Commit
b9c60e42
authored
12 years ago
by
Sébastien Luttringer
Browse files
Options
Downloads
Patches
Plain Diff
ensure changelog data are utf8
parent
0d71f245
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installsystems/image.py
+7
-1
7 additions, 1 deletion
installsystems/image.py
with
7 additions
and
1 deletion
installsystems/image.py
+
7
−
1
View file @
b9c60e42
...
...
@@ -1160,13 +1160,19 @@ class Changelog(dict):
Object representing a changelog in memory
'''
def
__init__
(
self
,
data
):
self
.
verbatim
=
""
self
.
verbatim
=
u
""
self
.
load
(
data
)
def
load
(
self
,
data
):
'''
Load a changelog file
'''
# ensure data are correct UTF-8
if
isinstance
(
data
,
str
):
try
:
data
=
unicode
(
data
,
"
UTF-8
"
)
except
UnicodeDecodeError
:
raise
Exception
(
"
Invalid character encoding in changelog
"
)
version
=
None
lines
=
data
.
split
(
"
\n
"
)
for
line
in
lines
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment