def set_proxy(self, enable=True, protocol="HTTP", server="localhost", port=3128):
        new_settings = SCPreferencesPathGetValue(self.session, u'/NetworkServices/')

        for interface in new_settings:
            new_settings[interface]['Proxies']["%sEnable" % protocol] = 1 if enable else 0
            if enable:
                new_settings[interface]['Proxies'][protocol % '%sPort']  = int(port)
                new_settings[interface]['Proxies']['%sProxy' % protocol] = server

        SCPreferencesPathSetValue(self.session, u'/NetworkServices/', new_settings)
dataset/ETHPy150Open MacSysadmin/pymacadmin/lib/PyMacAdmin/SCUtilities/SCPreferences.py/SCPreferences.set_proxy/swapped operands of `%`