~ubuntu-branches/ubuntu/wily/system-config-printer/wily

« back to all changes in this revision

Viewing changes to firewallsettings.py

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2014-08-05 23:59:59 UTC
  • mfrom: (256.1.1 utopic-proposed)
  • Revision ID: package-import@ubuntu.com-20140805235959-v1yzis5mo1nkxo2m
Tags: 1.5.0+20140805-0ubuntu2
debian/control: Build-depend on Python 3 (python3-all-dev).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python
 
1
#!/usr/bin/python3
2
2
 
3
3
## system-config-printer
4
4
 
62
62
            self.running = False
63
63
 
64
64
    def _get_active_zone (self):
65
 
        zones = self._fw.getActiveZones().keys()
 
65
        zones = list(self._fw.getActiveZones().keys())
66
66
        if not zones:
67
67
            debugprint ("FirewallD: no changeable zone")
68
68
            return None
183
183
                    return
184
184
 
185
185
                p = self._fw.read ()
186
 
                self._fw_data = json.loads (p.encode ('utf-8'))
 
186
                self._fw_data = json.loads (p)
187
187
            except (dbus.exceptions.DBusException, AttributeError, ValueError) as e:
188
188
                self._fw_data = (None, None)
189
189
                if error_handler:
203
203
 
204
204
    def reply_handler (self, result):
205
205
        try:
206
 
            self._fw_data = json.loads (result.encode ('utf-8'))
 
206
            self._fw_data = json.loads (result)
207
207
        except ValueError as e:
208
208
            self.error_handler (e)
209
209
            return