mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
qapi: Drop conditionals for Python 2
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200304155932.20452-3-armbru@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
baa310f1bb
commit
ed39c03e2f
4 changed files with 4 additions and 20 deletions
|
@ -12,7 +12,6 @@
|
|||
# See the COPYING file in the top-level directory.
|
||||
|
||||
import re
|
||||
import string
|
||||
|
||||
|
||||
# ENUMName -> ENUM_NAME, EnumName1 -> ENUM_NAME1
|
||||
|
@ -43,10 +42,7 @@ def c_enum_const(type_name, const_name, prefix=None):
|
|||
return camel_to_upper(type_name) + '_' + c_name(const_name, False).upper()
|
||||
|
||||
|
||||
if hasattr(str, 'maketrans'):
|
||||
c_name_trans = str.maketrans('.-', '__')
|
||||
else:
|
||||
c_name_trans = string.maketrans('.-', '__')
|
||||
c_name_trans = str.maketrans('.-', '__')
|
||||
|
||||
|
||||
# Map @name to a valid C identifier.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue