def _reset_password(self):
        auth = urllib2.HTTPBasicAuthHandler()
        auth.add_password(
                    realm  = self.router_realm,
                    uri    = self.router_url,
                    user   = self.admin_user,
                    passwd = self.admin_pass,
                )
        opener = urllib2.build_opener(auth)

        random_uuid = uuid.uuid4()
        password = base64.encodestring(random_uuid.bytes)[:8]

        content = dict(
            edLogin=self._username,
            edPassword=password,
            edConfirmPassword=password,
            cbPageList=0,
            cbDirList=0,
            cbCBMode=0,
            B1='Add/Update',
            AST_EditUserId=4
        )

        opener.open((self.router_url, urllib.urlencode(content)) % '%s?%s').read()
        return password
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/experiments/control_app.py/ControlAppExperiment._reset_password/swapped operands of `%`