Ticket #35437: patch-aksetup_helper.py.diff

File patch-aksetup_helper.py.diff, 1.2 KB (added by larryv (Lawrence Velázquez), 12 years ago)

patch to correct linker flags

  • aksetup_helper.py

    From 7f7fa90c69781616ee448778e65336e368670452 Mon Sep 17 00:00:00 2001
    From: Andreas Kloeckner <inform@tiker.net>
    Date: Wed, 1 Aug 2012 01:39:17 -0400
    Subject: [PATCH 1/1] Update aksetup to preserve commas in StringListOption defaults.
    
    ---
     aksetup_helper.py |    8 ++++++--
     1 files changed, 6 insertions(+), 2 deletions(-)
    
    diff --git a/aksetup_helper.py b/aksetup_helper.py
    index cafdad6..12953df 100644
    a b class StringListOption(Option): 
    486486        if default is None:
    487487            return None
    488488
    489         return ",".join([str(el) for el in default])
     489        return ",".join([str(el).replace(",", r"\,") for el in default])
    490490
    491491    def get_help(self, default):
    492492        return Option.get_help(self, default) + " (several ok)"
    class StringListOption(Option): 
    497497            return None
    498498        else:
    499499            if opt:
    500                 return opt.split(",")
     500                import re
     501                sep = re.compile(r"(?<!\\),")
     502                result = sep.split(opt)
     503                result = [i.replace(r"\,", ",") for i in result]
     504                return result
    501505            else:
    502506                return []
    503507