Skip to content

Commit

Permalink
Add value_string property, decode_as_string(entry.value)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecjharries committed Mar 17, 2018
1 parent 9d10675 commit 2e14065
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pygit2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ def level(self):
def name(self):
return self._entry.name

@property
def value_string(self):
return self.decode_as_string(self.value)

@staticmethod
def decode_as_string(value):
return ffi.string(value).decode('utf-8')

0 comments on commit 2e14065

Please sign in to comment.