diff --git a/gns3server/config.py b/gns3server/config.py index 7918c9d4..5d3369a3 100644 --- a/gns3server/config.py +++ b/gns3server/config.py @@ -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""" diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index e1bf3b5b..3aaed2d1 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -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)) diff --git a/gns3server/run.py b/gns3server/run.py index 0e413440..e1a59446 100644 --- a/gns3server/run.py +++ b/gns3server/run.py @@ -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 = {