Changeset 1b20da0 in mainline for tools/xstruct.py


Ignore:
Timestamp:
2018-02-28T17:52:03Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/xstruct.py

    rdf6ded8 r1b20da0  
    3939
    4040# Ensure that 's' format for struct receives correct data type depending
    41 # on Python version (needed due to different way to encode into bytes) 
     41# on Python version (needed due to different way to encode into bytes)
    4242ensure_string = \
    4343        (lambda value: value if type(value) is str else bytes(value)) \
     
    6666                                 (varname, str(type(value)), str(vartype)))
    6767        if value < varmin or value > varmax:
    68                 raise ValueError('Variable "%s" value %s out of range %s..%s' % 
     68                raise ValueError('Variable "%s" value %s out of range %s..%s' %
    6969                                 (varname, repr(value), repr(varmin), repr(varmax)))
    7070
     
    8888                                        value = ensure_string(value)
    8989                                check_range(variable, fmt, value)
    90                                 args.append(value)             
     90                                args.append(value)
    9191                return struct.pack(self._format_, *args)
    9292       
Note: See TracChangeset for help on using the changeset viewer.