Skip to content

Commit

Permalink
Merge pull request #16 from WaltHP/master
Browse files Browse the repository at this point in the history
Make sure data is sane before dereference
  • Loading branch information
rdobson authored Jul 25, 2016
2 parents 8125a15 + f12b01d commit c27c76b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hwinfo/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ def __init__(self, data, regexs=None, seperator=None):
self.set_seperator(seperator)

def set_data(self, data):
self.DATA = data.strip()
if data:
self.DATA = data.strip()
else:
self.DATA = ""

def set_regexs(self, regexs):
if regexs:
Expand Down

0 comments on commit c27c76b

Please sign in to comment.