Skip to content

Commit

Permalink
Merge pull request #176 from elyezer/fix-repo-enable-disable
Browse files Browse the repository at this point in the history
Fix command syntax for enabling/disabling repos
  • Loading branch information
cswiii committed Apr 23, 2015
2 parents c30c153 + db3d56b commit 326e72b
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions automation_tools/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ def disable_repos(*args):
disable_repos('repo1', 'repo2')
Will run the command ``subscription-manager repos --disable repo1 repo2``.
Will run the command ``subscription-manager repos --disable "repo1"
--disable "repo2"``.
"""
run('subscription-manager repos --disable {0}'
.format(' '.join(['"{0}"'.format(repo) for repo in args])))
run('subscription-manager repos {0}'
.format(' '.join(['--disable "{0}"'.format(repo) for repo in args])))


def delete_custom_repos(**args):
Expand Down Expand Up @@ -54,11 +55,12 @@ def enable_repos(*args, **kwargs):
enable_repos('repo1', 'repo2')
Will run the command ``subscription-manager repos --enable repo1 repo2``.
Will run the command ``subscription-manager repos --enable "repo1" --enable
"repo2"``.
"""
run('subscription-manager repos --enable {0}'
.format(' '.join(['"{0}"'.format(repo) for repo in args])))
run('subscription-manager repos {0}'
.format(' '.join(['--enable "{0}"'.format(repo) for repo in args])))


def create_custom_repos(**kwargs):
Expand Down

0 comments on commit 326e72b

Please sign in to comment.