Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

about: support gzipped license files

Changeset ffcbae25f9a1

Parent 0c7a335c61f2

by Steve Borho

Changes to one file · Browse files at ffcbae25f9a1 Showing diff from parent 0c7a335c61f2 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​about.py Stacked
 
62
63
64
65
66
 
 
 
 
 
 
 
67
68
69
 
62
63
64
 
 
65
66
67
68
69
70
71
72
73
74
@@ -62,8 +62,13 @@
  thg_icon = paths.get_tortoise_icon('thg_logo.ico')   try:   license_file = paths.get_license_path() - self.set_license(file(license_file).read()) - except IOError: + if license_file.endswith('.gz'): + import gzip + lic = gzip.open(license_file, 'rb').read() + else: + lic = open(license_file, 'rb').read() + self.set_license(lic) + except (ImportError, IOError):   license = hgtk.shortlicense.splitlines()[1:]   self.set_license('\n'.join(license))