diff options
author | pommicket <pommicket@gmail.com> | 2025-08-29 17:46:11 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-08-29 17:46:11 -0400 |
commit | d60c2eeed60e264ad30361ac99048f99d4975cfb (patch) | |
tree | a9933333542794fd352caae9656c44c8343d17c2 | |
parent | 92213c9097c9b26a0aeed86897b12ef54fcba5f3 (diff) |
Print mode in octal
-rwxr-xr-x | simpleddns.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/simpleddns.py b/simpleddns.py index 9434be6..45d9e89 100755 --- a/simpleddns.py +++ b/simpleddns.py @@ -47,12 +47,12 @@ def setup_config() -> None: return config_path.unlink() default_get_ip = 'curl --no-progress-meter ifconfig.co' - get_ip = input(f'Command for getting IP address [default: {default_get_ip}]? ').strip() - if not get_ip: - get_ip = default_get_ip domain_name = input('Domain name? ').strip() if not domain_name: fatal_error('Domain name must be set') + get_ip = input(f'Command for getting IP address [default: {default_get_ip}]? ').strip() + if not get_ip: + get_ip = default_get_ip if any(c.isspace() for c in domain_name): fatal_error('Domain name must not contain any whitespace') print('1. Linode Domains') @@ -81,7 +81,7 @@ if os.name == 'posix': config_mode = config_path.stat().st_mode if config_mode & 0o4: fatal_error(f'''DANGER: configuration file {config_path} allows -reading by other users (mode {config_mode}). +reading by other users (mode {config_mode & 0o777:o}). If there are API tokens in there, revoke them immediately!!''') class Domain(ABC): |