Skip to content

Commit

Permalink
Don't use new f'' string syntax - it doesn't work on Python <3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
ku1ik committed May 17, 2020
1 parent 0eec28d commit c94e898
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions asciinema/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def notifications_command(self):
return self.config.get('notifications', 'command', fallback=None)

def __get_key(self, section, name, default=None):
key = self.config.get(section, f'{name}_key', fallback=default)
key = self.config.get(section, name + '_key', fallback=default)

if key:
if len(key) == 3:
Expand All @@ -152,7 +152,7 @@ def __get_key(self, section, name, default=None):
if upper_key[0] == 'C' and upper_key[1] == '-':
return bytes([ord(upper_key[2]) - 0x40])
else:
raise ConfigError(f'invalid {name} key definition \'{key}\' - use: {name}_key = C-x (with control key modifier), or {name}_key = x (with no modifier)')
raise ConfigError('invalid {name} key definition \'{key}\' - use: {name}_key = C-x (with control key modifier), or {name}_key = x (with no modifier)'.format(name=name, key=key))
else:
return key.encode('utf-8')

Expand Down

0 comments on commit c94e898

Please sign in to comment.