diff options
author | Scott Moser <smoser@ubuntu.com> | 2015-07-28 11:44:32 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2015-07-28 11:44:32 -0400 |
commit | 55472eb02eaa5b88676a96e006f6838020f8ffe3 (patch) | |
tree | 54474328e1db2e470c73adfda1cf74214f14fb9b /cloudinit/config/cc_rsyslog.py | |
parent | db07b4b2b083bf8852cc5ae355892d5ff6282193 (diff) | |
download | vyos-cloud-init-55472eb02eaa5b88676a96e006f6838020f8ffe3.tar.gz vyos-cloud-init-55472eb02eaa5b88676a96e006f6838020f8ffe3.zip |
rsyslog: skip empty or None in remotes format
This allows user to specify the following to overwrite a previously
declared entry without warnings.
rsyslog: {'remotes': {'foo': None}}
Diffstat (limited to 'cloudinit/config/cc_rsyslog.py')
-rw-r--r-- | cloudinit/config/cc_rsyslog.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/config/cc_rsyslog.py b/cloudinit/config/cc_rsyslog.py index 5ecf1629..a0132d28 100644 --- a/cloudinit/config/cc_rsyslog.py +++ b/cloudinit/config/cc_rsyslog.py @@ -307,6 +307,8 @@ def remotes_to_rsyslog_cfg(remotes, header=None, footer=None): if header is not None: lines.append(header) for name, line in remotes.items(): + if not line: + continue try: lines.append(str(parse_remotes_line(line, name=name))) except ValueError as e: |