diff options
Diffstat (limited to '')
-rw-r--r-- | portato/backend/flags.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/portato/backend/flags.py b/portato/backend/flags.py index 810b607..6c74024 100644 --- a/portato/backend/flags.py +++ b/portato/backend/flags.py @@ -159,11 +159,17 @@ def generate_path (cpv, exp): cat, pkg, ver, rev = system.split_cpv(cpv) if rev != "r0": ver = "%s-%s" % (ver, rev) + exp = exp.replace("$(cat)",cat).\ replace("$(pkg)",pkg).\ replace("$(cat-1)",cat.split("-")[0]).\ - replace("$(cat-2)",cat.split("-")[1]).\ replace("$(version)",ver) + + try: + exp = exp.replace("$(cat-2)",cat.split("-")[1]) + except IndexError: # category only consists of one part -- ignore + pass + return exp ### USE FLAG PART ### |