91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 16.09MB
    文件類型: .gz
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-06-18
  • 語言: 其他
  • 標簽: sqoop??

資源簡介

sqoop-1.4.6.bin__hadoop-2.0.4-alpha.tar.gz

資源截圖

代碼片段和文件信息

#!/usr/local/bin/python
#
#?Licensed?to?the?Apache?Software?Foundation?(ASF)?under?one
#?or?more?contributor?license?agreements.??See?the?NOTICE?file
#?distributed?with?this?work?for?additional?information
#?regarding?copyright?ownership.??The?ASF?licenses?this?file
#?to?you?under?the?Apache?License?Version?2.0?(the
#?“License“);?you?may?not?use?this?file?except?in?compliance
#?with?the?License.??You?may?obtain?a?copy?of?the?License?at
#
#???http://www.apache.org/licenses/LICENSE-2.0
#
#?Unless?required?by?applicable?law?or?agreed?to?in?writing
#?software?distributed?under?the?License?is?distributed?on?an
#?“AS?IS“?BASIS?WITHOUT?WARRANTIES?OR?CONDITIONS?OF?ANY
#?KIND?either?express?or?implied.??See?the?License?for?the
#?specific?language?governing?permissions?and?limitations
#?under?the?License.

import?argparse
import?sys
import?os
import?time
import?datetime
import?tempfile
import?commands
from?jira.client?import?JIRA

def?get_jira_config():
??#?read?the?config?file
??home=jira_home=os.getenv(‘HOME‘)
??home=home.rstrip(‘/‘)
??jira_config?=?dict(line.strip().split(‘=‘)?for?line?in?open(home?+?‘/jira.ini‘))
??return?jira_config

def?get_jira():
??options?=?{
????‘server‘:?‘https://issues.apache.org/jira‘
??}

??jira_config?=?get_jira_config()
??jira?=?JIRA(optionsbasic_auth=(jira_config[‘user‘]?jira_config[‘password‘]))
??return?jira


def?cmd_exists(cmd):
??status?result?=?commands.getstatusoutput(cmd)
??return?status

def?main():
??‘‘‘?main()?shut?up?pylint?‘‘‘
??popt?=?argparse.ArgumentParser(description=‘Sqoop?patch?review?tool‘)
??popt.add_argument(‘-b‘?‘--branch‘?action=‘store‘?dest=‘branch‘?required=True?help=‘Tracking?branch?to?create?diff?against‘)
??popt.add_argument(‘-j‘?‘--jira‘?action=‘store‘?dest=‘jira‘?required=True?help=‘JIRA?corresponding?to?the?reviewboard‘)
??popt.add_argument(‘-s‘?‘--summary‘?action=‘store‘?dest=‘summary‘?required=False?help=‘Summary?for?the?reviewboard‘)
??popt.add_argument(‘-d‘?‘--description‘?action=‘store‘?dest=‘description‘?required=False?help=‘Description?for?reviewboard‘)
??popt.add_argument(‘-r‘?‘--rb‘?action=‘store‘?dest=‘reviewboard‘?required=False?help=‘Review?board?that?needs?to?be?updated‘)
??popt.add_argument(‘-t‘?‘--testing-done‘?action=‘store‘?dest=‘testing‘?required=False?help=‘Text?for?the?Testing?Done?section?of?the?reviewboard‘)
??popt.add_argument(‘-db‘?‘--debug‘?action=‘store_true‘?required=False?help=‘Enable?debug?mode‘)
??opt?=?popt.parse_args()

??post_review_tool?=?None
??if?(cmd_exists(“post-review“)?==?0):
????post_review_tool?=?“post-review“
??elif?(cmd_exists(“rbt“)?==?0):
????post_review_tool?=?“rbt?post“
??else:
????print?“please?install?RBTools“
????sys.exit(1)

??patch_file=tempfile.gettempdir()?+?“/“?+?opt.jira?+?“.patch“
??if?opt.reviewboard:
????ts?=?time.time()
????st?=?datetime.datetime.fromtimestamp(ts).strftime(‘%Y-%m-%d_%H:%M:%S‘)
????patch_file=tempfile.gettempdir()?+?“/“?+?opt.jira?+?‘_‘?+?st?+?‘.patch‘

??#?first?check?if?r

評論

共有 條評論