mirror of
https://github.com/YunoHost/package_linter.git
synced 2024-09-03 20:06:12 +02:00
Aaaannnd I broke everything
This commit is contained in:
parent
c303c149a0
commit
d910c59d76
1 changed files with 4 additions and 2 deletions
|
@ -493,11 +493,13 @@ class App(TestSuite):
|
|||
@test()
|
||||
def bad_encoding(self):
|
||||
|
||||
cmd = "file --mime-encoding $(find %s/ -type f) | grep 'iso-8859-1'" % self.path
|
||||
cmd = "file --mime-encoding $(find %s/ -type f) | grep 'iso-8859-1' || true" % self.path
|
||||
bad_encoding_files = subprocess.check_output(cmd, shell=True).decode('utf-8').strip().split("\n")
|
||||
for file_ in bad_encoding_files:
|
||||
if not file_:
|
||||
continue
|
||||
file_ = file_.split()[0]
|
||||
yield Info("%s appears to be encoded as latin-1 / iso-8859-1. Please consider converting it to utf-8 to avoid funky issues. Something like 'iconv -f iso-8859-1 -t utf-8 SOURCE DEST' should do the trick." % file_)
|
||||
yield Info("%s appears to be encoded as latin-1 / iso-8859-1. Please consider converting it to utf-8 to avoid funky issues. Something like 'iconv -f iso-8859-1 -t utf-8 SOURCE > DEST' should do the trick." % file_)
|
||||
|
||||
|
||||
#######################################
|
||||
|
|
Loading…
Add table
Reference in a new issue