CATCHERR_BUFFILE_PATH = None
CATCHERR_SAVED_2 = -1
-# save the orignal stdout/stderr at the very start
+# save the original stdout/stderr at the very start
STDOUT = sys.stdout
STDERR = sys.stderr
def core_http(method, url, data=None, filep=None):
"""Wrapper above core.<http_METHOD> to catch exceptions."""
- # Workarounded osc bug. http_GET sometimes returns empty responce
+ # Workarounded osc bug. http_GET sometimes returns empty response
# Usually next try succeeds, so let's try 3 times
for count in (1, 2, 3):
try:
if count == 3:
raise OSCError(str(err))
- raise OSCError('Got empty responce from %s %s' % \
+ raise OSCError('Got empty response from %s %s' % \
(method.func_name.split('_')[-1], url))
def copy_project(self, src, target, rewrite=False):
if not fnames:
url = core.makeurl(self.apiurl, ['source', prj, pkg])
try:
- responce = self.core_http(core.http_GET, url).read()
+ response = self.core_http(core.http_GET, url).read()
except OSCError, err:
raise ObsError("can't get list of sources from"\
" %s/%s: %s" % (prj, pkg, err))
fnames = [entry.get('name') for entry in \
- core.ET.fromstring(responce)]
+ core.ET.fromstring(response)]
for fname in fnames:
if fname is None:
continue
from argparse import RawDescriptionHelpFormatter
class GbsHelpFormatter(RawDescriptionHelpFormatter):
- """Changed default arparse help output by request from cmdln lovers."""
+ """Changed default argparse help output by request from cmdln lovers."""
def __init__(self, *args, **kwargs):
super(GbsHelpFormatter, self).__init__(*args, **kwargs)
def format_help(self):
"""
- There is no safe and documented way in argparser to reformat
+ There is no safe and documented way in argparse to reformat
help output through APIs as almost all of them are private,
so this method just parses the output and changes it.
"""
class TempCopy(object):
"""Copy original file to temporary file in the same directory as
- original. Creates empty termporary file if original doesn't exist.
- Deletes termporary file when object is destroyed.
+ original. Creates empty temporary file if original doesn't exist.
+ Deletes temporary file when object is destroyed.
"""
def __init__(self, orig_fpath):
help='this option disables running configure scripts '
'and auto generation of auto-tools to make incremental '
'build possible. This requires the configure scripts '
- 'in the spec to be refereneced using the %%configure, '
- '%%reconfigre and %%autogen macros')
+ 'in the spec to be referenced using the %%configure, '
+ '%%reconfigure and %%autogen macros')
parser.set_defaults(alias="lb")
return parser
return False
# Create top level parser
- epilog = "Try 'gbs SUBCOMAND --help' for help on a specific subcommand."
+ epilog = "Try 'gbs SUBCOMMAND --help' for help on a specific subcommand."
description = "gbs - the command line tool for Tizen package developers"
parser = ArgumentParser(description=description, epilog=epilog,
formatter_class=GbsHelpFormatter)