From 842c5817eebb9fdf014c5323c84f7d0ec28ce223 Mon Sep 17 00:00:00 2001 From: Huang Hao Date: Fri, 26 Oct 2012 11:06:24 +0800 Subject: [PATCH] Fix typos. #497 Change-Id: Ifdacca345a449ffbd8ba503a0dc8d5b399ba50d1 --- gitbuildsys/msger.py | 2 +- gitbuildsys/oscapi.py | 8 ++++---- gitbuildsys/parsing.py | 4 ++-- gitbuildsys/utils.py | 4 ++-- tools/gbs | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gitbuildsys/msger.py b/gitbuildsys/msger.py index 3728a8d..a5f68d3 100644 --- a/gitbuildsys/msger.py +++ b/gitbuildsys/msger.py @@ -69,7 +69,7 @@ CATCHERR_BUFFILE_FD = -1 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 diff --git a/gitbuildsys/oscapi.py b/gitbuildsys/oscapi.py index 692536a..89e9b69 100644 --- a/gitbuildsys/oscapi.py +++ b/gitbuildsys/oscapi.py @@ -71,7 +71,7 @@ class OSC(object): def core_http(method, url, data=None, filep=None): """Wrapper above core. 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: @@ -81,7 +81,7 @@ class OSC(object): 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): @@ -202,13 +202,13 @@ class OSC(object): 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 diff --git a/gitbuildsys/parsing.py b/gitbuildsys/parsing.py index 68c0cea..5c29da9 100644 --- a/gitbuildsys/parsing.py +++ b/gitbuildsys/parsing.py @@ -24,7 +24,7 @@ import functools 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) @@ -41,7 +41,7 @@ class GbsHelpFormatter(RawDescriptionHelpFormatter): 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. """ diff --git a/gitbuildsys/utils.py b/gitbuildsys/utils.py index 48860f4..9879f92 100644 --- a/gitbuildsys/utils.py +++ b/gitbuildsys/utils.py @@ -118,8 +118,8 @@ class Temp(object): 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): diff --git a/tools/gbs b/tools/gbs index 8821c97..b4f4dc4 100755 --- a/tools/gbs +++ b/tools/gbs @@ -197,8 +197,8 @@ def build_parser(parser): 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 @@ -343,7 +343,7 @@ def main(argv): 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) -- 2.7.4