Skip to content

Commit

Permalink
Use auto resource management for license file
Browse files Browse the repository at this point in the history
  • Loading branch information
hduelme committed Jan 7, 2025
1 parent ddd88f3 commit 38fee29
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions usr/lib/webapp-manager/webapp-manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,8 @@ def open_about(self, widget):
dlg.set_program_name(_("Web Apps"))
dlg.set_comments(_("Run websites as if they were apps"))
try:
h = open('/usr/share/common-licenses/GPL', encoding="utf-8")
s = h.readlines()
gpl = ""
for line in s:
gpl += line
h.close()
with open('/usr/share/common-licenses/GPL', encoding="utf-8") as h:
gpl = h.read()
dlg.set_license(gpl)
except Exception as e:
print(e)
Expand Down

0 comments on commit 38fee29

Please sign in to comment.