summaryrefslogtreecommitdiffstats
path: root/commands/ccs2pcs.py
diff options
context:
space:
mode:
Diffstat (limited to 'commands/ccs2pcs.py')
-rw-r--r--commands/ccs2pcs.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/commands/ccs2pcs.py b/commands/ccs2pcs.py
index 6aa5e48..ea41cf2 100644
--- a/commands/ccs2pcs.py
+++ b/commands/ccs2pcs.py
@@ -6,6 +6,7 @@
__author__ = "Jan Pokorný <jpokorny @at@ Red Hat .dot. com>"
from ..command import Command, CommandAlias
+from ..utils import file_scan
@Command.deco(('ccs2ccsflat',
@@ -35,16 +36,17 @@ def ccs2pcs_flatiron(cmd_ctxt,
"""
#cmd_ctxt.filter()['validate'] = not nocheck
#cmd_ctxt.filter('ccs2ccsflat')['validate'] = not nocheck
- return (
- ('file', input),
- (
- ('file', ccs_pcmk),
- ('file', cib),
+ with file_scan(ccs_pcmk, cib, coro) as (ccs_pcmk, cib, coro):
+ yield (
+ ('file', input),
(
- ('file', coro),
+ ('file', ccs_pcmk),
+ ('file', cib),
+ (
+ ('file', coro),
+ )
)
)
- )
@Command.deco(('ccs2ccsflat',
@@ -70,15 +72,16 @@ def ccs2pcs_needle(cmd_ctxt,
"""
#cmd_ctxt.filter()['validate'] = not nocheck
#cmd_ctxt.filter('ccs2ccsflat')['validate'] = not nocheck
- return (
- ('file', input),
- (
- ('file', cib),
+ with file_scan(cib, coro) as (cib, coro):
+ yield (
+ ('file', input),
(
- ('file', coro),
+ ('file', cib),
+ (
+ ('file', coro),
+ )
)
)
- )
@CommandAlias.deco