Permalink
Browse files

Remove trinary if-else for 2.4 compatibility

Change-Id: Ibce99b18c68ffd7e523a585a28f2b334b34da699
Reviewed-on: http://review.membase.org/3245
Reviewed-by: Steve Yen <steve.yen@gmail.com>
Tested-by: Steve Yen <steve.yen@gmail.com>
  • Loading branch information...
seanlynch authored and steveyen committed Oct 13, 2010
1 parent adb561f commit 00099b5715ee5e9c8b37d675e99b8397a39bd963
Showing with 6 additions and 2 deletions.
  1. +6 −2 collect_info
View
@@ -63,8 +63,12 @@ class TaskRunner(object):
if task.privileged and os.getuid() != 0:
print >> sys.stderr, "skipped (needs root privs)"
return
- filename = task.log_file if hasattr(task, 'log_file') else \
- self.default_name
+
+ if hasattr(task, 'log_file'):
+ filename = task.log_file
+ else:
+ filename = self.default_name
+
fp = self.get_file(filename)
self.header(fp, task.description, task.command)
result = task.execute(fp)

0 comments on commit 00099b5

Please sign in to comment.