Commit 8c5eb96d by Hiroaki Nakamura

Do not use shortcut conditional operator which is not supported in Python 2.4.

parent a0da0afe
...@@ -58,8 +58,10 @@ class UnimplementedStrategy(object): ...@@ -58,8 +58,10 @@ class UnimplementedStrategy(object):
def unimplemented_error(self): def unimplemented_error(self):
platform = get_platform() platform = get_platform()
distribution = get_distribution() distribution = get_distribution()
msg_platform = '%s (%s)' % (platform, distribution) \ if distribution is not None:
if distribution is not None else platform msg_platform = '%s (%s)' % (platform, distribution)
else:
msg_platform = platform
self.module.fail_json( self.module.fail_json(
msg='hostname module cannot be used on platform %s' % msg_platform) msg='hostname module cannot be used on platform %s' % msg_platform)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment