本文整理汇总了Python中helpers.Helpers.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Helpers.__init__方法的具体用法?Python Helpers.__init__怎么用?Python Helpers.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类helpers.Helpers
的用法示例。
在下文中一共展示了Helpers.__init__方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import __init__ [as 别名]
def __init__(self, filename, spec=None):
Helpers.__init__(self)
self.filename = filename
self.spec = spec
self.is_build = False
self.build_failed = False
self._rpm_files = None
self.rpmlint_output = []
self.unpack()
示例2: __init__
# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import __init__ [as 别名]
def __init__(self, base, plugin_path):
Helpers.__init__(self)
self.plugin_path = plugin_path
self.version = None
self.spec = base.spec
self.srpm = base.srpm
self.sources = base.sources
self.encoder = ReviewJSONEncoder()
self.decoder = JSONDecoder()
self.results = []
self.plug_in = None
self.plug_out = None
self.plug_err = None
示例3: __init__
# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import __init__ [as 别名]
def __init__(self, base):
Helpers.__init__(self)
self.base = base
self.spec = base.spec
self.srpm = base.srpm
self.sources = base.sources
self.url = None
self.text = None
self.description = None
self.state = 'pending'
self.type = 'MUST'
self.result = None
self.output_extra = None
self.attachments = []
示例4: __init__
# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import __init__ [as 别名]
def __init__(self, sources, tag, url):
def my_logger(cache):
if cache:
path = urlparse(url).path
self.log.info("Using cached data for (%s): %s" %
(tag, os.path.basename(path)))
else:
self.log.info("Downloading (%s): %s" % (tag, url))
Helpers.__init__(self)
self.sources = sources
self.tag = tag
self.downloaded = True
is_url = urlparse(url)[0] != ''
if is_url: # This is a URL, Download it
self.url = url
self.local = False
try:
self.filename = self._get_file(url,
ReviewDirs.upstream,
my_logger)
except:
self.log.debug('Download error on ' + url,
exc_info=True)
self.log.warning('Cannot download url: ' + url)
self.downloaded = False
# get the filename
url = urlparse(url)[2].split('/')[-1]
if not is_url or not self.downloaded: # this is a local file in the SRPM
local_src = os.path.join(ReviewDirs.startdir, url)
if os.path.exists(local_src):
self.log.info(
"Using local file " + url + " as " + tag)
srcdir = ReviewDirs.startdir
self.local_src = local_src
self.local = False
else:
self.log.info("No upstream for (%s): %s" % (tag, url))
srcdir = ReviewDirs.srpm_unpacked
self.local = True
self.filename = os.path.join(srcdir, url)
self.url = 'file://' + self.filename
示例5: __init__
# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import __init__ [as 别名]
def __init__(self):
Helpers.__init__(self)
self.spec_url = None
self.srpm_url = None
self.spec_file = None
self.srpm_file = None
示例6: __init__
# 需要导入模块: from helpers import Helpers [as 别名]
# 或者: from helpers.Helpers import __init__ [as 别名]
def __init__(self):
Helpers.__init__(self)