Skip to content

Commit

Permalink
All: python3 support changes
Browse files Browse the repository at this point in the history
  • Loading branch information
isapozhkov committed Jan 9, 2017
1 parent aa537a8 commit 8a01743
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion tests/fakewifi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import os
from sysdmanager import SystemdManager
from .configs import wificontrol, wpas, hotspot, wifi
from configs import wificontrol, wpas, hotspot, wifi

restart_mdns_cmd = "systemctl restart mdns.service && sleep 2"
rfkill_block_cmd = "rfkill block wifi"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hostapd.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import platform
import subprocess
from random import randint
from .fakewifi import fakeHostAP as HostAP
from fakewifi import fakeHostAP as HostAP

class HostAPTest(unittest.TestCase):

Expand Down
2 changes: 1 addition & 1 deletion tests/test_wificontrol.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import unittest
import platform
import subprocess
from .fakewifi import fakeWiFiControl as WiFiControl
from fakewifi import fakeWiFiControl as WiFiControl

class WiFiControlTest(unittest.TestCase):

Expand Down
2 changes: 1 addition & 1 deletion tests/test_wpas.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import platform
import subprocess
from random import randint
from .fakewifi import fakeWpaSupplicant as WpaSupplicant
from fakewifi import fakeWpaSupplicant as WpaSupplicant

class ValidationError(Exception):
pass
Expand Down
2 changes: 1 addition & 1 deletion wificontrol/hostapd.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, interface,
self.hostapd_path = hostapd_config
self.hostname_path = hostname_config

if ("bin/hostapd" not in self.execute_command("whereis hostapd")):
if (b'bin/hostapd' not in self.execute_command("whereis hostapd")):
raise OSError('No HOSTAPD servise')

self.started = lambda: self.sysdmanager.is_active("hostapd.service")
Expand Down
2 changes: 1 addition & 1 deletion wificontrol/utils/fileupdater.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __findNetwork(self, network_aim):
return network

def __update_config_file(self):
with open(self.__config_file_path, 'w', 0) as config_file:
with open(self.__config_file_path, 'w') as config_file:
config_file.write(self.__create_config_file())

def add_network(self, network):
Expand Down
2 changes: 1 addition & 1 deletion wificontrol/wpasupplicant.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(self, interface,
self.wpa_supplicant_path = wpas_config
self.p2p_supplicant_path = p2p_config

if ("bin/wpa_supplicant" not in self.execute_command("whereis wpa_supplicant")):
if (b'bin/wpa_supplicant' not in self.execute_command("whereis wpa_supplicant")):
raise OSError('No WPA_SUPPLICANT servise')

self.wpa_supplicant_interface = WpaSupplicantInterface(self.interface)
Expand Down

0 comments on commit 8a01743

Please sign in to comment.