+def __get_description(patch):
+ """Extract and return a patch's short description
+ """
+ p = crt_series.get_patch(patch)
+ descr = p.get_description().strip()
+ descr_lines = descr.split('\n')
+ return descr_lines[0].rstrip()
+
+def __print_patch(patch, prefix, empty_prefix, length, options):
+ if options.empty and crt_series.empty_patch(patch):
+ prefix = empty_prefix
+ if options.description:
+ print prefix + patch.ljust(length) + ' | ' + __get_description(patch)
+ else:
+ print prefix + patch
+