diff options
-rwxr-xr-x | puppethost.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/puppethost.py b/puppethost.py index 1d83f7e..3398584 100755 --- a/puppethost.py +++ b/puppethost.py @@ -46,8 +46,8 @@ class PuppetHost(object): if not hostname: raise PuppetHostError('A hostname must be provided') - if '.' not in hostname and domain: - hostname = '.'.join([hostname, domain]) + if '.' not in hostname and opts['domain']: + hostname = '.'.join([hostname, opts['domain']]) hostname = hostname.lower() self.hostname = hostname |