mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-12-19 21:07:57 +00:00
English fix profil => profile
This commit is contained in:
parent
67fc563d81
commit
436543d8b8
@ -36,13 +36,13 @@ class Config:
|
||||
Configuration file management using configparser.
|
||||
|
||||
:param files: Array of configuration files (optional)
|
||||
:param profil: Profil settings (default use standard settings file)
|
||||
:param profile: Profil settings (default use standard settings file)
|
||||
"""
|
||||
|
||||
def __init__(self, files=None, profil=None):
|
||||
def __init__(self, files=None, profile=None):
|
||||
|
||||
self._files = files
|
||||
self._profil = profil
|
||||
self._profile = profile
|
||||
|
||||
# Monitor configuration files for changes
|
||||
self._watched_files = {}
|
||||
@ -63,8 +63,8 @@ class Config:
|
||||
appdata = os.path.expandvars("%APPDATA%")
|
||||
common_appdata = os.path.expandvars("%COMMON_APPDATA%")
|
||||
|
||||
if self._profil:
|
||||
user_dir = os.path.join(appdata, appname, "profiles", self._profil)
|
||||
if self._profile:
|
||||
user_dir = os.path.join(appdata, appname, "profiles", self._profile)
|
||||
else:
|
||||
user_dir = os.path.join(appdata, appname)
|
||||
|
||||
@ -88,8 +88,8 @@ class Config:
|
||||
home = os.path.expanduser("~")
|
||||
filename = "gns3_server.conf"
|
||||
|
||||
if self._profil:
|
||||
user_dir = os.path.join(home, ".config", appname, "profiles", self._profil)
|
||||
if self._profile:
|
||||
user_dir = os.path.join(home, ".config", appname, "profiles", self._profile)
|
||||
else:
|
||||
user_dir = os.path.join(home, ".config", appname)
|
||||
|
||||
@ -107,11 +107,11 @@ class Config:
|
||||
self._watch_config_file()
|
||||
|
||||
@property
|
||||
def profil(self):
|
||||
def profile(self):
|
||||
"""
|
||||
Settings profil
|
||||
Settings profile
|
||||
"""
|
||||
return self._profil
|
||||
return self._profile
|
||||
|
||||
def clear(self):
|
||||
"""Restart with a clean config"""
|
||||
|
@ -55,8 +55,8 @@ class Controller:
|
||||
|
||||
server_config = Config.instance().get_section_config("Server")
|
||||
|
||||
if Config.instance().profil:
|
||||
config_path = os.path.join(config_path, "profiles", Config.instance().profil)
|
||||
if Config.instance().profile:
|
||||
config_path = os.path.join(config_path, "profiles", Config.instance().profile)
|
||||
self._config_file = os.path.join(config_path, "gns3_controller.conf")
|
||||
log.info("Load controller configuration file {}".format(self._config_file))
|
||||
|
||||
|
@ -105,14 +105,14 @@ def parse_arguments(argv):
|
||||
parser.add_argument("--log", help="send output to logfile instead of console")
|
||||
parser.add_argument("--daemon", action="store_true", help="start as a daemon")
|
||||
parser.add_argument("--pid", help="store process pid")
|
||||
parser.add_argument("--profil", help="Settings profil (blank will use default settings files)")
|
||||
parser.add_argument("--profile", help="Settings profile (blank will use default settings files)")
|
||||
parser.add_argument("--discovery", action="store_true", help="Make server discoverable on the network")
|
||||
|
||||
args = parser.parse_args(argv)
|
||||
if args.config:
|
||||
Config.instance(files=[args.config], profil=args.profil)
|
||||
Config.instance(files=[args.config], profile=args.profile)
|
||||
else:
|
||||
Config.instance(profil=args.profil)
|
||||
Config.instance(profile=args.profile)
|
||||
|
||||
config = Config.instance().get_section_config("Server")
|
||||
defaults = {
|
||||
|
Loading…
Reference in New Issue
Block a user