From 1ecbc6b8a4bd1a37bd808f9f9830e7884629ca14 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Wed, 26 Nov 2008 01:40:20 -0500 Subject: Fix domain when hostname is not fully qualified --- puppethost.py | 4 ++-- 1 file 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 -- cgit