Skip to content

Commit

Permalink
Captive portal, python 3 issue, trying to read script as binary. for #…
Browse files Browse the repository at this point in the history
…3612

(cherry picked from commit e4b5133)
  • Loading branch information
AdSchellevis authored and fichtner committed Jul 30, 2019
1 parent b0b59da commit 7a7da93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/opnsense/scripts/OPNsense/CaptivePortal/lib/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def create(self, force_recreate=False):
if cur.fetchall()[0][0] == 0:
# empty database, initialize database
init_script_filename = '%s/../sql/init.sql' % os.path.dirname(os.path.abspath(__file__))
cur.executescript(open(init_script_filename, 'rb').read())
cur.executescript(open(init_script_filename, 'r').read())
cur.close()

def sessions_per_address(self, zoneid, ip_address=None, mac_address=None):
Expand Down

0 comments on commit 7a7da93

Please sign in to comment.