Skip to content

Commit

Permalink
Merge pull request #203 from jonls/filemark-no-question
Browse files Browse the repository at this point in the history
context: Do not write question marks in FileMark string
  • Loading branch information
jonls committed Feb 24, 2017
2 parents e807aa4 + 7af08ce commit ef1389b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions psamm/datasource/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ def column(self):
return self._column

def __str__(self):
return '{}:{}:{}'.format(
text_type(self._filecontext),
'?' if self._line is None else self._line,
'?' if self._column is None else self._column)
result = text_type(self._filecontext)
if self._line is not None:
result += ':{}'.format(self._line)
if self._column is not None:
result += ':{}'.format(self._column)
return result

def __repr__(self):
return str('{}({}, {}, {})').format(
Expand Down

0 comments on commit ef1389b

Please sign in to comment.