From 7bd59c4b23e9fb5131754280584fddc560088299 Mon Sep 17 00:00:00 2001 From: Hiroaki Nakamura Date: Tue, 15 Oct 2013 23:41:49 +0900 Subject: [PATCH] Do not use shortcut conditional operator which is not supported in Python 2.4. --- system/hostname | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/system/hostname b/system/hostname index 9836b98c71f..826e0f630d2 100644 --- a/system/hostname +++ b/system/hostname @@ -58,8 +58,10 @@ class UnimplementedStrategy(object): def unimplemented_error(self): platform = get_platform() distribution = get_distribution() - msg_platform = '%s (%s)' % (platform, distribution) \ - if distribution is not None else platform + if distribution is not None: + msg_platform = '%s (%s)' % (platform, distribution) + else: + msg_platform = platform self.module.fail_json( msg='hostname module cannot be used on platform %s' % msg_platform)