Use new f-strings where possible

This commit is contained in:
Kristóf Tóth
2018-04-19 09:21:41 +02:00
parent 3f36826597
commit b1592e8ebb
5 changed files with 8 additions and 8 deletions

View File

@ -40,9 +40,9 @@ class FileManager: # pylint: disable=too-many-instance-attributes
@workdir.setter
def workdir(self, directory):
if not exists(directory) or not isdir(directory):
raise EnvironmentError('"{}" is not a directory!'.format(directory))
raise EnvironmentError(f'"{directory}" is not a directory!')
if not self._is_in_whitelisted_dir(directory):
raise EnvironmentError('Directory "{}" is not in whitelist!'.format(directory))
raise EnvironmentError(f'Directory "{directory}" is not in whitelist!')
self._workdir = directory
@property