You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-firewall/ufw/files/ufw-0.30.1-encoding.patch

16 lines
363 B

Fixes usage with ufw-frontends.
upstream bug report: https://bugs.launchpad.net/ufw/+bug/921758
--- src/util.py
+++ src/util.py
@@ -205,8 +205,9 @@
def open_file_read(f):
'''Opens the specified file read-only'''
+ import codecs
try:
- orig = open(f, 'r')
+ orig = codecs.open(f, 'r', "UTF-8")
except Exception:
raise