Subversion Repositories ALCASAR

Rev

Details | Last modification | View Log

Rev Author Line No. Line
3085 rexy 1
--- conf/CoovaChilliLib.py.in	2022-10-07 09:40:14.000000000 +0200
2
+++ conf/CoovaChilliLib.py.in	2022-11-02 10:35:29.022431562 +0100
3
@@ -1,4 +1,4 @@
4
-#!/usr/bin/python
5
+#!/usr/bin/python3
6
 """
7
  CoovaChilli Python Library
8
  Copyright (C) 2009  David Bird <david@coova.com>
9
@@ -148,7 +148,7 @@
10
         return
11
 
12
     def saveConfig( self, data=None ):
13
-        print "Storing configuration changes"
14
+        print ("Storing configuration changes")
15
 
16
         for setting in self.Settings:
17
             if self.Entries.get(setting):
18
@@ -181,7 +181,7 @@
19
         selectPath = -1
20
 
21
         for line in p.stdout.readlines():
22
-            print line
23
+            print (line)
24
             s = line.split()
25
             self.sessionsStore.append([ s[0], s[1] ])
26
             if self.selectedMac == s[0]:
27
@@ -222,20 +222,20 @@
28
         return True
29
 
30
     def sessionRelease( self, widget ):
31
-        print 'Releasing '+self.selectedMac
32
+        print ('Releasing '+self.selectedMac)
33
         p = subprocess.Popen([self.Query, self.Socket, "dhcp-release", self.selectedMac]).communicate()
34
         self.chilliQuery()
35
         return
36
 
37
     def sessionBlock( self, widget ):
38
-        print 'Blocking access from '+self.selectedMac
39
+        print ('Blocking access from '+self.selectedMac)
40
         p = subprocess.Popen([self.Query, self.Socket, "block", self.selectedMac]).communicate()
41
         self.chilliQuery()
42
         return
43
 
44
     def sessionAuthorize( self, widget ):
45
         if self.selectedSessionId:
46
-            print 'Authorizing '+self.selectedSessionId
47
+            print ('Authorizing '+self.selectedSessionId)
48
             p = subprocess.Popen([self.Query, self.Socket, "authorize", "sessionid", self.selectedSessionId]).communicate()
49
             self.chilliQuery()
50
         return
51
@@ -305,7 +305,7 @@
52
         return
53
 
54
     def _changeSection(self, section):
55
-        print 'change to '+section
56
+        print ('change to '+section)
57
         self.section = section
58
 
59
         for setting in self.Settings:
60
@@ -329,7 +329,7 @@
61
         return
62
 
63
     def row3(self, treeview, iter, path, action):
64
-        print action
65
+        print (action)
66
 
67
     def row1(self, treeview, action):
68
         if action == 'cursor-changed':
69
@@ -337,12 +337,12 @@
70
             model, iter = selection.get_selected()
71
             if iter:
72
                 mac = self.sessionsStore.get_value(iter, 0)
73
-                print 'Selected: '+mac
74
+                print ('Selected: '+mac)
75
                 self.sesAuth.set_sensitive( True )
76
                 self.sesRelease.set_sensitive( True )
77
                 self.sesBlock.set_sensitive( True )
78
                 self._chilliQuery( mac )
79
-        print action
80
+        print (action)
81
 
82
     def formatOctets(self, o):
83
         return o
84
@@ -499,7 +499,7 @@
85
         self.btnStop.connect( "clicked", self.stopCoovaChilli )
86
 
87
     def main( self ):
88
-        print 'hello'
89
+        print ('hello')
90
 
91
 
92