Skip to content

Commit a8a0e7f

Browse files
author
Martin Vejnár
committed
Fix crash when -R option is not provided
1 parent 76991ab commit a8a0e7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pe_tools/peresed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main():
6161
gp.add_argument('--add-dependency', '-M', action='append', metavar="DEP", default=[], help="add dependency. DEP should be a space separated list of key=value pairs, e.g. " +
6262
"\"type=win32 name=Microsoft.Windows.Common-Controls version=6.0.0.0 processorArchitecture=* publicKeyToken=6595b64144ccf1df language=*\"")
6363
gp.add_argument('--set-version', '-V', action='append', metavar="STR", help="updates the specified version-info field, e.g. FileVersion=\"1, 2, 3, 4\"")
64-
gp.add_argument('--set-resource', '-R', metavar=('TYPE', 'NAME', 'LANG', 'FILE'), nargs=4, action='append', help='set a resource entry to the contents of a file, e.g. "-R RT_RCDATA prog.exe 0 prog.exe"')
64+
gp.add_argument('--set-resource', '-R', metavar=('TYPE', 'NAME', 'LANG', 'FILE'), nargs=4, action='append', default=[], help='set a resource entry to the contents of a file, e.g. "-R RT_RCDATA prog.exe 0 prog.exe"')
6565

6666
ap.add_argument('--output', '-o', help="write the edited contents to OUTPUT instead of editing the input file in-place")
6767
ap.add_argument('file', help="the PE file to parse and edit")

0 commit comments

Comments
 (0)