Исправлены переменные

Нельзя импортировать переменные из другой секции
develop 3.4.3
parent 32b05656b1
commit 91f8affaa2

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright 2008-2013 Calculate Ltd. http://www.calculate-linux.org # Copyright 2008-2015 Calculate Ltd. http://www.calculate-linux.org
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.

@ -26,7 +26,7 @@ from calculate.lib.utils.files import (isMount, readFile, find,
FindFileType) FindFileType)
from calculate.lib.utils.common import getValueFromCmdLine from calculate.lib.utils.common import getValueFromCmdLine
from calculate.lib.utils.portage import isPkgInstalled from calculate.lib.utils.portage import isPkgInstalled
from calculate.lib.variables.user import VariableUrLogin from calculate.lib.variables import user
from calculate.lib.convertenv import convertEnv from calculate.lib.convertenv import convertEnv
from calculate.lib.utils.ip import isOpenPort from calculate.lib.utils.ip import isOpenPort
import time import time
@ -271,7 +271,7 @@ class VariableUrUserNewPw(Variable):
raise VariableError(_("Empty password")) raise VariableError(_("Empty password"))
class VariableClClientLogin(VariableUrLogin): class VariableClClientLogin(user.VariableUrLogin):
""" """
User Login User Login
""" """
@ -279,7 +279,7 @@ class VariableClClientLogin(VariableUrLogin):
alias = "ur_login" alias = "ur_login"
def choice(self): def choice(self):
loginChoice = VariableUrLogin.choice(self) loginChoice = user.VariableUrLogin.choice(self)
if self.Get('cl_action') == 'passwd': if self.Get('cl_action') == 'passwd':
return filter(lambda x: x != "root", loginChoice) return filter(lambda x: x != "root", loginChoice)
else: else:

Loading…
Cancel
Save