diff options
Diffstat (limited to 'src/software/openlmi/software/yumdb/jobs.py')
-rw-r--r-- | src/software/openlmi/software/yumdb/jobs.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/software/openlmi/software/yumdb/jobs.py b/src/software/openlmi/software/yumdb/jobs.py index 966e625..985c0bc 100644 --- a/src/software/openlmi/software/yumdb/jobs.py +++ b/src/software/openlmi/software/yumdb/jobs.py @@ -644,23 +644,25 @@ class YumSpecificRepositoryJob(YumJob): #pylint: disable=R0903 """ Abstract job taking instance of yumdb.Repository as argument. Arguments: - repoid - plays different role depending on job subclass - """ - __slots__ = ('repoid', ) - def __init__(self, repoid): - if not isinstance(repoid, Repository): - raise TypeError("repoid must be instance of yumdb.Repository") + repo - (``Repository`` or ``str``) plays different role depending + on job subclass + """ + __slots__ = ('repo', ) + def __init__(self, repo): + if not isinstance(repo, (Repository, basestring)): + raise TypeError("repoid must be either instance of" + " yumdb.Repository or string") YumJob.__init__(self) - self.repoid = repoid + self.repo = repo class YumSetRepositoryEnabled(YumSpecificRepositoryJob):#pylint: disable=R0903 """ Job allowing to enable or disable repository. Arguments: - enable - boolean representing next state + enable - (``boolean``) representing next state """ __slots__ = ('enable', ) - def __init__(self, repoid, enable): - YumSpecificRepositoryJob.__init__(self, repoid) + def __init__(self, repo, enable): + YumSpecificRepositoryJob.__init__(self, repo) self.enable = bool(enable) |