Fix quite common Exception typos

This commit is contained in:
Max Arnold 2018-06-21 14:22:44 +07:00
parent 769cfe1a7d
commit 00798a9e33
15 changed files with 23 additions and 23 deletions

View file

@ -383192,7 +383192,7 @@ fc306fc8c3 Add missing colon in \fIif\fP statement
.IP \(bu 2
822eabcc81 Catch exceptions raised when making changes to jenkins
.IP \(bu 2
91b583b493 Improve and correct execption raising
91b583b493 Improve and correct exception raising
.IP \(bu 2
f096917a0e Raise an exception if we fail to cache the config xml
.UNINDENT
@ -409330,7 +409330,7 @@ fc306fc Add missing colon in \fIif\fP statement
.IP \(bu 2
822eabc Catch exceptions raised when making changes to jenkins
.IP \(bu 2
91b583b Improve and correct execption raising
91b583b Improve and correct exception raising
.IP \(bu 2
f096917 Raise an exception if we fail to cache the config xml
.UNINDENT

View file

@ -2347,7 +2347,7 @@ Changelog for v2015.5.3..v2015.5.4
* 9a1351eada Change print to logger, so we can set a level and log exc_info
* **PR** `#25120`_: (`d--j`_) add missing continue for exeption case
* **PR** `#25120`_: (`d--j`_) add missing continue for exception case
@ *2015-07-02 19:38:45 UTC*
* a723af0f10 Merge pull request `#25120`_ from d--j/patch-2

View file

@ -313,7 +313,7 @@ Changelog for v2016.11.7..v2016.11.8
* 822eabcc81 Catch exceptions raised when making changes to jenkins
* 91b583b493 Improve and correct execption raising
* 91b583b493 Improve and correct exception raising
* f096917a0e Raise an exception if we fail to cache the config xml

View file

@ -717,7 +717,7 @@ Changelog for v2017.7.1..v2017.7.2
* 822eabcc81 Catch exceptions raised when making changes to jenkins
* 91b583b493 Improve and correct execption raising
* 91b583b493 Improve and correct exception raising
* f096917a0e Raise an exception if we fail to cache the config xml

View file

@ -8,7 +8,7 @@
This module provides a `Sentry`_ logging handler. Sentry is an open source
error tracking platform that provides deep context about exceptions that
happen in production. Details about stack traces along with the context
variables available at the time of the exeption are easily browsable and
variables available at the time of the exception are easily browsable and
filterable from the online interface. For more details please see
`Sentry`_.

View file

@ -61,7 +61,7 @@ def _connect(host=DEFAULT_HOST, port=DEFAULT_PORT):
def _check_stats(conn):
'''
Helper function to check the stats data passed into it, and raise an
execption if none are returned. Otherwise, the stats are returned.
exception if none are returned. Otherwise, the stats are returned.
'''
stats = conn.get_stats()
if not stats:

View file

@ -960,7 +960,7 @@ class Pillar(object):
)
)
log.error(
'Execption caught loading ext_pillar \'%s\':\n%s',
'Exception caught loading ext_pillar \'%s\':\n%s',
key, ''.join(traceback.format_tb(sys.exc_info()[2]))
)
if ext:

View file

@ -110,7 +110,7 @@ def get_conn(opts, profile=None, host=None, port=None):
def _check_stats(conn):
'''
Helper function to check the stats data passed into it, and raise an
execption if none are returned. Otherwise, the stats are returned.
exception if none are returned. Otherwise, the stats are returned.
'''
stats = conn.get_stats()
if not stats:

View file

@ -129,7 +129,7 @@ def call(napalm_device, method, *args, **kwargs):
* result (True/False): if the operation succeeded
* out (object): returns the object as-is from the call
* comment (string): provides more details in case the call failed
* traceback (string): complete traceback in case of exeception. \
* traceback (string): complete traceback in case of exception. \
Please submit an issue including this traceback \
on the `correct driver repo`_ and make sure to read the FAQ_

View file

@ -101,7 +101,7 @@ class MasterTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
master.shutdown()
# pylint: disable=invalid-name
@ -131,7 +131,7 @@ class MasterTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
master.shutdown()
def test_exit_status_correct_usage(self):

View file

@ -298,7 +298,7 @@ class MinionTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
minion.shutdown()
# pylint: disable=invalid-name
@ -328,7 +328,7 @@ class MinionTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
minion.shutdown()
def test_exit_status_correct_usage(self):

View file

@ -55,7 +55,7 @@ class ProxyTest(testprogram.TestProgramCase):
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
proxy.shutdown()
def test_exit_status_unknown_user(self):
@ -85,7 +85,7 @@ class ProxyTest(testprogram.TestProgramCase):
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
proxy.shutdown()
# pylint: disable=invalid-name
@ -114,7 +114,7 @@ class ProxyTest(testprogram.TestProgramCase):
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
proxy.shutdown()
def test_exit_status_correct_usage(self):

View file

@ -106,7 +106,7 @@ class SyndicTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
syndic.shutdown()
# pylint: disable=invalid-name
@ -135,7 +135,7 @@ class SyndicTest(ShellCase, testprogram.TestProgramCase, ShellCaseCommonTestsMix
finally:
# Although the start-up should fail, call shutdown() to set the
# internal _shutdown flag and avoid the registered atexit calls to
# cause timeout exeptions and respective traceback
# cause timeout exceptions and respective traceback
syndic.shutdown()
def test_exit_status_correct_usage(self):

View file

@ -385,7 +385,7 @@ class Test_Junos_Module(TestCase, LoaderModuleMockMixin, XMLEqualityMixin):
ret['out'] = True
self.assertEqual(junos.commit(), ret)
def test_commit_raise_commit_check_exeception(self):
def test_commit_raise_commit_check_exception(self):
with patch('jnpr.junos.utils.config.Config.commit_check') as mock_commit_check:
mock_commit_check.side_effect = self.raise_exception
ret = dict()

View file

@ -230,10 +230,10 @@ class MinionTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
try:
# mock gen.sleep to throw a special Exception when called, so that we detect it
class SleepCalledEception(Exception):
class SleepCalledException(Exception):
"""Thrown when sleep is called"""
pass
tornado.gen.sleep.return_value.set_exception(SleepCalledEception())
tornado.gen.sleep.return_value.set_exception(SleepCalledException())
# up until process_count_max: gen.sleep does not get called, processes are started normally
for i in range(process_count_max):
@ -248,7 +248,7 @@ class MinionTestCase(TestCase, AdaptedConfigurationTestCaseMixin):
mock_data = {'fun': 'foo.bar',
'jid': process_count_max + 1}
self.assertRaises(SleepCalledEception,
self.assertRaises(SleepCalledException,
lambda: io_loop.run_sync(lambda: minion._handle_decoded_payload(mock_data)))
self.assertEqual(salt.utils.process.SignalHandlingMultiprocessingProcess.start.call_count,
process_count_max)