mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-24 22:06:14 +01:00
Fix several undefined-variable issues reported by pylint
This commit is contained in:
parent
feb53212dd
commit
eb83b42f32
@ -15,11 +15,12 @@ from xml.etree import ElementTree as ET
|
||||
|
||||
from . import conf
|
||||
from . import connection
|
||||
from . import core
|
||||
from . import oscerr
|
||||
from .conf import config
|
||||
from .core import get_buildinfo, store_read_project, store_read_package, meta_exists, quote_plus, get_buildconfig, is_package_dir, dgst
|
||||
from .core import get_binarylist, get_binary_file, run_external, return_external, raw_input
|
||||
from .fetch import Fetcher, verify_pacs
|
||||
from .fetch import Fetcher, OscFileGrabber, verify_pacs
|
||||
from .meter import create_text_meter
|
||||
from .util import rpmquery, debquery, archquery
|
||||
from .util.helper import decode_it
|
||||
@ -1078,7 +1079,7 @@ def main(apiurl, opts, argv):
|
||||
http_debug = config['http_debug'],
|
||||
modules = bi.modules,
|
||||
enable_cpio=not opts.disable_cpio_bulk_download and bi.enable_cpio,
|
||||
cookiejar=CookieJarAuthHandler(os.path.expanduser(conf.config["cookiejar"]))._cookiejar,
|
||||
cookiejar=connection.CookieJarAuthHandler(os.path.expanduser(conf.config["cookiejar"]))._cookiejar,
|
||||
download_api_only=opts.download_api_only)
|
||||
|
||||
if not opts.trust_all_projects:
|
||||
|
@ -856,11 +856,11 @@ class Osc(cmdln.Cmdln):
|
||||
query['project'] = args[0]
|
||||
query['package'] = args[1]
|
||||
url = makeurl(apiurl, ['trigger', operation], query)
|
||||
req = URLRequest(url)
|
||||
req.get_method = lambda: "POST"
|
||||
req.add_header('Content-Type', 'application/octet-stream')
|
||||
req.add_header('Authorization', "Token "+opts.trigger)
|
||||
fd = urlopen(req, data=None)
|
||||
headers = {
|
||||
'Content-Type': 'application/octet-stream',
|
||||
'Authorization': "Token " + opts.trigger,
|
||||
}
|
||||
fd = http_POST(url, headers=headers)
|
||||
print(decode_it(fd.read()))
|
||||
else:
|
||||
if args and args[0] in ['create', 'delete', 'trigger']:
|
||||
|
Loading…
Reference in New Issue
Block a user