晋太元中,武陵人捕鱼为业。缘溪行,忘路之远近。忽逢桃花林,夹岸数百步,中无杂树,芳草鲜美,落英缤纷。渔人甚异之,复前行,欲穷其林。 林尽水源,便得一山,山有小口,仿佛若有光。便舍船,从口入。初极狭,才通人。复行数十步,豁然开朗。土地平旷,屋舍俨然,有良田、美池、桑竹之属。阡陌交通,鸡犬相闻。其中往来种作,男女衣着,悉如外人。黄发垂髫,并怡然自乐。 见渔人,乃大惊,问所从来。具答之。便要还家,设酒杀鸡作食。村中闻有此人,咸来问讯。自云先世避秦时乱,率妻子邑人来此绝境,不复出焉,遂与外人间隔。问今是何世,乃不知有汉,无论魏晋。此人一一为具言所闻,皆叹惋。余人各复延至其家,皆出酒食。停数日,辞去。此中人语云:“不足为外人道也。”(间隔 一作:隔绝) 既出,得其船,便扶向路,处处志之。及郡下,诣太守,说如此。太守即遣人随其往,寻向所志,遂迷,不复得路。 南阳刘子骥,高尚士也,闻之,欣然规往。未果,寻病终。后遂无问津者。
|
Server : Apache System : Linux srv.rainic.com 4.18.0-553.47.1.el8_10.x86_64 #1 SMP Wed Apr 2 05:45:37 EDT 2025 x86_64 User : rainic ( 1014) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /lib/python3.6/site-packages/dnf/ |
Upload File : |
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
# Copyright 2004 Duke University
"""
Core DNF Errors.
"""
from __future__ import unicode_literals
from dnf.i18n import ucd, _, P_
import dnf.util
import libdnf
import warnings
class DeprecationWarning(DeprecationWarning):
# :api
pass
class Error(Exception):
# :api
"""Base Error. All other Errors thrown by DNF should inherit from this.
:api
"""
def __init__(self, value=None):
super(Error, self).__init__()
self.value = None if value is None else ucd(value)
def __str__(self):
return "{}".format(self.value)
def __unicode__(self):
return ucd(self.__str__())
class CompsError(Error):
# :api
pass
class ConfigError(Error):
def __init__(self, value=None, raw_error=None):
super(ConfigError, self).__init__(value)
self.raw_error = ucd(raw_error) if raw_error is not None else None
class DatabaseError(Error):
pass
class DepsolveError(Error):
# :api
pass
class DownloadError(Error):
# :api
def __init__(self, errmap):
super(DownloadError, self).__init__()
self.errmap = errmap
@staticmethod
def errmap2str(errmap):
errstrings = []
for key in errmap:
for error in errmap[key]:
msg = '%s: %s' % (key, error) if key else '%s' % error
errstrings.append(msg)
return '\n'.join(errstrings)
def __str__(self):
return self.errmap2str(self.errmap)
class LockError(Error):
pass
class MarkingError(Error):
# :api
def __init__(self, value=None, pkg_spec=None):
"""Initialize the marking error instance."""
super(MarkingError, self).__init__(value)
self.pkg_spec = None if pkg_spec is None else ucd(pkg_spec)
def __str__(self):
string = super(MarkingError, self).__str__()
if self.pkg_spec:
string += ': ' + self.pkg_spec
return string
class MarkingErrors(Error):
# :api
def __init__(self, no_match_group_specs=(), error_group_specs=(), no_match_pkg_specs=(),
error_pkg_specs=(), module_depsolv_errors=()):
"""Initialize the marking error instance."""
msg = _("Problems in request:")
if (no_match_pkg_specs):
msg += "\n" + _("missing packages: ") + ", ".join(no_match_pkg_specs)
if (error_pkg_specs):
msg += "\n" + _("broken packages: ") + ", ".join(error_pkg_specs)
if (no_match_group_specs):
msg += "\n" + _("missing groups or modules: ") + ", ".join(no_match_group_specs)
if (error_group_specs):
msg += "\n" + _("broken groups or modules: ") + ", ".join(error_group_specs)
if (module_depsolv_errors):
msg_mod = dnf.util._format_resolve_problems(module_depsolv_errors[0])
if module_depsolv_errors[1] == \
libdnf.module.ModulePackageContainer.ModuleErrorType_ERROR_IN_DEFAULTS:
msg += "\n" + "\n".join([P_('Modular dependency problem with Defaults:',
'Modular dependency problems with Defaults:',
len(module_depsolv_errors)),
msg_mod])
else:
msg += "\n" + "\n".join([P_('Modular dependency problem:',
'Modular dependency problems:',
len(module_depsolv_errors)),
msg_mod])
super(MarkingErrors, self).__init__(msg)
self.no_match_group_specs = no_match_group_specs
self.error_group_specs = error_group_specs
self.no_match_pkg_specs = no_match_pkg_specs
self.error_pkg_specs = error_pkg_specs
self.module_depsolv_errors = module_depsolv_errors
@property
def module_debsolv_errors(self):
msg = "Attribute module_debsolv_errors is deprecated. Use module_depsolv_errors " \
"attribute instead."
warnings.warn(msg, DeprecationWarning, stacklevel=2)
return self.module_depsolv_errors
class MetadataError(Error):
pass
class MiscError(Error):
pass
class PackagesNotAvailableError(MarkingError):
def __init__(self, value=None, pkg_spec=None, packages=None):
super(PackagesNotAvailableError, self).__init__(value, pkg_spec)
self.packages = packages or []
class PackageNotFoundError(MarkingError):
pass
class PackagesNotInstalledError(MarkingError):
def __init__(self, value=None, pkg_spec=None, packages=None):
super(PackagesNotInstalledError, self).__init__(value, pkg_spec)
self.packages = packages or []
class ProcessLockError(LockError):
def __init__(self, value, pid):
super(ProcessLockError, self).__init__(value)
self.pid = pid
def __reduce__(self):
"""Pickling support."""
return (ProcessLockError, (self.value, self.pid))
class RepoError(Error):
# :api
pass
class ThreadLockError(LockError):
pass
class TransactionCheckError(Error):
pass