mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
patchutils.py: Simplify access of optional dict values.
This commit is contained in:
parent
b0cbb8bda2
commit
f21c3bc221
@ -54,8 +54,8 @@ class PatchObject(object):
|
||||
self.patch_author = header['author']
|
||||
self.patch_email = header['email']
|
||||
self.patch_subject = header['subject']
|
||||
self.patch_revision = header['revision'] if header.has_key('revision') else 1
|
||||
self.signed_off_by = header['signedoffby'] if header.has_key('signedoffby') else []
|
||||
self.patch_revision = header.get('revision', 1)
|
||||
self.signed_off_by = header.get('signedoffby', [])
|
||||
|
||||
self.filename = filename
|
||||
self.offset_begin = None
|
||||
|
Loading…
Reference in New Issue
Block a user