Blame | Last modification | View Log
--- conf/CoovaChilliLib.py.in 2022-10-07 09:40:14.000000000 +0200
+++ conf/CoovaChilliLib.py.in 2022-11-02 10:35:29.022431562 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
"""
CoovaChilli Python Library
Copyright (C) 2009 David Bird <david@coova.com>
@@ -148,7 +148,7 @@
return
def saveConfig( self, data=None ):
- print "Storing configuration changes"
+ print ("Storing configuration changes")
for setting in self.Settings:
if self.Entries.get(setting):
@@ -181,7 +181,7 @@
selectPath = -1
for line in p.stdout.readlines():
- print line
+ print (line)
s = line.split()
self.sessionsStore.append([ s[0], s[1] ])
if self.selectedMac == s[0]:
@@ -222,20 +222,20 @@
return True
def sessionRelease( self, widget ):
- print 'Releasing '+self.selectedMac
+ print ('Releasing '+self.selectedMac)
p = subprocess.Popen([self.Query, self.Socket, "dhcp-release", self.selectedMac]).communicate()
self.chilliQuery()
return
def sessionBlock( self, widget ):
- print 'Blocking access from '+self.selectedMac
+ print ('Blocking access from '+self.selectedMac)
p = subprocess.Popen([self.Query, self.Socket, "block", self.selectedMac]).communicate()
self.chilliQuery()
return
def sessionAuthorize( self, widget ):
if self.selectedSessionId:
- print 'Authorizing '+self.selectedSessionId
+ print ('Authorizing '+self.selectedSessionId)
p = subprocess.Popen([self.Query, self.Socket, "authorize", "sessionid", self.selectedSessionId]).communicate()
self.chilliQuery()
return
@@ -305,7 +305,7 @@
return
def _changeSection(self, section):
- print 'change to '+section
+ print ('change to '+section)
self.section = section
for setting in self.Settings:
@@ -329,7 +329,7 @@
return
def row3(self, treeview, iter, path, action):
- print action
+ print (action)
def row1(self, treeview, action):
if action == 'cursor-changed':
@@ -337,12 +337,12 @@
model, iter = selection.get_selected()
if iter:
mac = self.sessionsStore.get_value(iter, 0)
- print 'Selected: '+mac
+ print ('Selected: '+mac)
self.sesAuth.set_sensitive( True )
self.sesRelease.set_sensitive( True )
self.sesBlock.set_sensitive( True )
self._chilliQuery( mac )
- print action
+ print (action)
def formatOctets(self, o):
return o
@@ -499,7 +499,7 @@
self.btnStop.connect( "clicked", self.stopCoovaChilli )
def main( self ):
- print 'hello'
+ print ('hello')