Skip to content

Commit

Permalink
Migrated % string formating
Browse files Browse the repository at this point in the history
  • Loading branch information
quantifiedcode-bot committed Dec 6, 2015
1 parent 435492e commit 501a014
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions btsync/client.py
Expand Up @@ -41,7 +41,7 @@ def __init__(self, **kwargs):
self._password = kwargs.pop('password', 'password')

assert len(kwargs.keys()) == 0, \
"Unrecognized params: %r" % kwargs.keys()
"Unrecognized params: {0!r}".format(kwargs.keys())
self._session = self._authenticate()

def _make_request(self, **kwargs):
Expand All @@ -65,7 +65,7 @@ def _make_request(self, **kwargs):

method = getattr(
session if session is not None else self._session, method)
assert method is not None, 'Invalid method: %s' % method
assert method is not None, 'Invalid method: {0!s}'.format(method)

response = method(url)
response.raise_for_status()
Expand Down
2 changes: 1 addition & 1 deletion btsync/models.py
Expand Up @@ -7,7 +7,7 @@ def __init__(self, **params):
value = params.pop(field)
self[field] = factory(value)

assert len(params) == 0, "Unrecognized params: %r" % params.keys()
assert len(params) == 0, "Unrecognized params: {0!r}".format(params.keys())


class Settings(Model):
Expand Down
2 changes: 1 addition & 1 deletion fabfile.py
Expand Up @@ -3,7 +3,7 @@

def _run_coverage_for(kind):
assert kind in ('unit', 'integration', '')
test_folder = 'test/%s' % kind
test_folder = 'test/{0!s}'.format(kind)
local('coverage run --source=btsync,%(test_folder)s '
'$(which nosetests) %(test_folder)s' % dict(
test_folder=test_folder))
Expand Down
2 changes: 1 addition & 1 deletion test/integration/test_integration.py
Expand Up @@ -34,7 +34,7 @@ def setup(self):

with open(config_file_name, 'w') as f:
CONFIG['storage_path'] = storage_path
CONFIG['webui']['listen'] = '0.0.0.0:%s' % PORT
CONFIG['webui']['listen'] = '0.0.0.0:{0!s}'.format(PORT)
json.dump(CONFIG, f)

self.btsync_process = subprocess.Popen([
Expand Down

0 comments on commit 501a014

Please sign in to comment.