Skip to content

Commit

Permalink
Removing superfluous 'if True:'
Browse files Browse the repository at this point in the history
  • Loading branch information
phlax committed Aug 19, 2015
1 parent 2b1b188 commit 1cd3097
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions translate/storage/pypo.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,16 +760,15 @@ class pofile(pocommon.pofile):

def parse(self, input):
"""Parses the given file or file source string."""
if True:
if hasattr(input, 'name'):
self.filename = input.name
elif not getattr(self, 'filename', ''):
self.filename = ''
if isinstance(input, str):
input = BytesIO(input)
# clear units to get rid of automatically generated headers before parsing
self.units = []
poparser.parse_units(poparser.ParseState(input, pounit), self)
if hasattr(input, 'name'):
self.filename = input.name
elif not getattr(self, 'filename', ''):
self.filename = ''
if isinstance(input, str):
input = BytesIO(input)
# clear units to get rid of automatically generated headers before parsing
self.units = []
poparser.parse_units(poparser.ParseState(input, pounit), self)

def removeduplicates(self, duplicatestyle="merge"):
"""Make sure each msgid is unique ; merge comments etc from
Expand Down

0 comments on commit 1cd3097

Please sign in to comment.