diff options
author | Britney Fransen <brfransen@gmail.com> | 2018-10-22 17:39:46 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2018-10-22 17:39:46 (GMT) |
commit | 099672c7dcf309a8ad100b2932a8d4470d08c7e1 (patch) | |
tree | 7d41793d67eeda256e628d1bc44839b6a5d91d8c /abs/core/LinHES-system/find_orphans.py | |
parent | 1e9a4cb5ef1594db04186fbf166c0c298ff4de1e (diff) | |
download | linhes_pkgbuild-099672c7dcf309a8ad100b2932a8d4470d08c7e1.zip linhes_pkgbuild-099672c7dcf309a8ad100b2932a8d4470d08c7e1.tar.gz linhes_pkgbuild-099672c7dcf309a8ad100b2932a8d4470d08c7e1.tar.bz2 |
find_orphans.py: fix encodings
Diffstat (limited to 'abs/core/LinHES-system/find_orphans.py')
-rw-r--r-- | abs/core/LinHES-system/find_orphans.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/abs/core/LinHES-system/find_orphans.py b/abs/core/LinHES-system/find_orphans.py index b1d78de..3c6cc46 100644 --- a/abs/core/LinHES-system/find_orphans.py +++ b/abs/core/LinHES-system/find_orphans.py @@ -24,7 +24,7 @@ class File( str ): self.size = int(size) def pprint(self): name = u'%s: %s' % (self.host, os.path.join(self.path, self)) - print u' {0:<90}{1:>8}'.format(name, human_size(self.size)) + print u' {0:<90}{1:>8}'.format(name, human_size(self.size)).encode('utf-8') def delete(self): be = MythBE(self.host, db=DB) be.deleteFile(self, self.group) @@ -35,20 +35,20 @@ class MyRecorded( Recorded ): name = u'{0.hostname}: {0.title}'.format(self) if self.subtitle: name += u' - '+self.subtitle - print u' {0:<70}{1:>28}'.format(name,self.basename) + print u' {0:<70}{1:>28}'.format(name,self.basename).encode('utf-8') def printrecs(title, recs): print title for rec in sorted(recs, key=lambda x: x.title): rec.pprint() - print u'{0:>88}{1:>12}'.format('Count:',len(recs)) + print u'{0:>87}{1:>12}'.format('Count:',len(recs)).encode('utf-8') def printfiles(title, files): print title for f in sorted(files, key=lambda x: x.path): f.pprint() size = sum([f.size for f in files]) - print u'{0:>88}{1:>12}'.format('Total:',human_size(size)) + print u'{0:>87}{1:>12}'.format('Total:',human_size(size)).encode('utf-8') def populate(host=None): unfiltered = [] |