Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SoftLayer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
__author__ = 'SoftLayer Technologies, Inc.'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 SoftLayer Technologies, Inc.'
__all__ = [
__all__ = [ # noqa: F405
'BaseClient',
'create_client_from_env',
'Client',
Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/shell/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def cli(ctx, env):
return
except ShellExit:
return
except Exception as ex:
except Exception:
env.vars['last_exit_code'] = 1
traceback.print_exc(file=sys.stderr)

Expand Down
2 changes: 1 addition & 1 deletion SoftLayer/testing/xmlrpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def do_POST(self):
allow_none=True,
methodresponse=True)
self.wfile.write(response_body.encode('utf-8'))
except Exception as ex:
except Exception:
self.send_response(500)
logging.exception("Error while handling request")

Expand Down
26 changes: 13 additions & 13 deletions tests/CLI/helper_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,29 +154,29 @@ def test_sort(self):

class FormattedListTests(testing.TestCase):
def test_init(self):
l = formatting.listing([1, 'two'], separator=':')
self.assertEqual([1, 'two'], list(l))
self.assertEqual(':', l.separator)
listing = formatting.listing([1, 'two'], separator=':')
self.assertEqual([1, 'two'], list(listing))
self.assertEqual(':', listing.separator)

l = formatting.listing([])
self.assertEqual(',', l.separator)
listing = formatting.listing([])
self.assertEqual(',', listing.separator)

def test_to_python(self):
l = formatting.listing([1, 'two'])
result = l.to_python()
listing = formatting.listing([1, 'two'])
result = listing.to_python()
self.assertEqual([1, 'two'], result)

l = formatting.listing(x for x in [1, 'two'])
result = l.to_python()
listing = formatting.listing(x for x in [1, 'two'])
result = listing.to_python()
self.assertEqual([1, 'two'], result)

def test_str(self):
l = formatting.listing([1, 'two'])
result = str(l)
listing = formatting.listing([1, 'two'])
result = str(listing)
self.assertEqual('1,two', result)

l = formatting.listing((x for x in [1, 'two']), separator=':')
result = str(l)
listing = formatting.listing((x for x in [1, 'two']), separator=':')
result = str(listing)
self.assertEqual('1:two', result)


Expand Down
3 changes: 1 addition & 2 deletions tests/managers/hardware_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ def test_cancel_hardware(self):

def test_cancel_hardware_no_billing_item(self):
mock = self.set_mock('SoftLayer_Hardware_Server', 'getObject')
mock.return_value = {'id': 987, 'openCancellationTicket': {'id': 1234},
'openCancellationTicket': {'id': 1234}}
mock.return_value = {'id': 987, 'openCancellationTicket': {'id': 1234}}

ex = self.assertRaises(SoftLayer.SoftLayerError,
self.hardware.cancel_hardware,
Expand Down
1 change: 0 additions & 1 deletion tests/managers/vs/vs_capacity_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ def test_create_guest(self):
'maxMemory': None,
'hostname': 'A1538172419',
'domain': 'test.com',
'localDiskFlag': None,
'hourlyBillingFlag': True,
'supplementalCreateObjectOptions': {
'bootMode': None,
Expand Down