diff options
author | Michal Minar <miminar@redhat.com> | 2013-05-10 16:01:58 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-07-03 13:05:27 +0200 |
commit | 2b6b6949b7a27e103fc5e486b9f1d90da0d80bea (patch) | |
tree | f0cf87d3af0e4d50aebdca2d10750e94258aaa33 /src | |
parent | 6e8736fd571767a74c334a6a112a337917519cb7 (diff) | |
download | openlmi-providers-2b6b6949b7a27e103fc5e486b9f1d90da0d80bea.tar.gz openlmi-providers-2b6b6949b7a27e103fc5e486b9f1d90da0d80bea.tar.xz openlmi-providers-2b6b6949b7a27e103fc5e486b9f1d90da0d80bea.zip |
added some comments strings
also fixed some typos
Diffstat (limited to 'src')
-rw-r--r-- | src/software/openlmi/software/yumdb/__init__.py | 10 | ||||
-rw-r--r-- | src/software/openlmi/software/yumdb/errors.py | 11 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/software/openlmi/software/yumdb/__init__.py b/src/software/openlmi/software/yumdb/__init__.py index 71fc1c5..c26432b 100644 --- a/src/software/openlmi/software/yumdb/__init__.py +++ b/src/software/openlmi/software/yumdb/__init__.py @@ -448,7 +448,7 @@ class YumDB(singletonmixin.Singleton): cmpi_logging.logger.info('YumDB: YumWorker terminated') self._process = None else: - cmpi_logging.logger.warn("YunDB: clean_up called, when process" + cmpi_logging.logger.warn("YumDB: clean_up called, when process" " not initialized!") # ************************************************************************* @@ -564,8 +564,12 @@ class YumDB(singletonmixin.Singleton): @job_request(async=True) def check_package(self, pkg, async=False, **metadata): """ - @param pkg is an instance of PackageInfo representing installed package - @return instance of yumdb.PackageCheck + Return all necessary information from package database for package + verification. + + :param pkg: (``PackageInfo``) An instance of PackageInfo + representing installed package or its nevra string. + :rtype: (``PackageCheck``) """ return self._do_job(_make_async_job(jobs.YumCheckPackage, pkg, async=async, metadata=metadata)) diff --git a/src/software/openlmi/software/yumdb/errors.py b/src/software/openlmi/software/yumdb/errors.py index 34230e5..44eb1c7 100644 --- a/src/software/openlmi/software/yumdb/errors.py +++ b/src/software/openlmi/software/yumdb/errors.py @@ -51,6 +51,7 @@ class TransactionExecutionFailed(TransactionError): pass class PackageError(YumDBError): + """Generic exception for error concerning package handling.""" pass class PackageNotFound(PackageError): """Raised, when requested package could not be found.""" @@ -67,6 +68,7 @@ class FileNotFound(PackageError): pass class RepositoryError(YumDBError): + """Generic exception for error concerning repository handling.""" pass class RepositoryNotFound(RepositoryError): """Raised, when requested repository cound not be found.""" @@ -77,6 +79,7 @@ class RepositoryChangeError(RepositoryError): pass class JobError(YumDBError): + """Generic exception for job handling.""" pass class UnknownJob(JobError): """Raised, when no handler is available for given job on worker.""" @@ -86,15 +89,23 @@ class InvalidURI(JobError): def __init__(self, uri): JobError.__init__(self, "Invalid uri: \"%s\"" % uri) class InvalidNevra(JobError): + """Raised when trying to instantiate job with invalid nevra string.""" pass class JobControlError(JobError): + """Generic exception for management of asynchronous jobs.""" pass class JobNotFound(JobControlError): + """Raised upon request for not existing asynchronous job.""" def __init__(self, target): JobControlError.__init__(self, "job %s could not be found" % target) class InvalidJobState(JobControlError): + """ + Raised when requested operation can not be executed on job in + its current state. + """ pass class IndicationError(YumDBError): + """Generic error for indication handling.""" pass |