Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify main #433

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6428,7 +6428,7 @@ def get_rva_from_offset(self, offset):
def get_offset_from_rva(self, rva):
"""Get the file offset corresponding to this RVA.

Given a RVA , this method will find the section where the
Given a RVA, this method will find the section where the
data lies and return the offset within the file.
"""

Expand Down Expand Up @@ -8012,12 +8012,8 @@ def adjust_SectionAlignment(self, val, section_alignment, file_alignment):
def main():
import sys

usage = """\
pefile.py <filename>
pefile.py exports <filename>"""

if not sys.argv[1:]:
print(usage)
print('pefile.py <filename>', 'pefile.py exports <filename>', sep='\n')
elif sys.argv[1] == "exports":
if not sys.argv[2:]:
sys.exit("error: <filename> required")
Expand Down
Loading