Skip to content

Commit

Permalink
Don't try replace if value is None
Browse files Browse the repository at this point in the history
  • Loading branch information
tomchop committed Dec 21, 2015
1 parent 2f01da3 commit 095b268
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion autoruns.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@ def parse_service_key(self, service_key):
if entry:
if main:
entry += " ({})".format(main)
entry = entry.replace('\x00', '')
if entry:
entry = entry.replace('\x00', '')

# Check if the service is set to automatically start
# More details here: http://technet.microsoft.com/en-us/library/cc759637(v=ws.10).aspx
Expand Down

1 comment on commit 095b268

@hiddenillusion
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomchop that'll work, thanks.

Please sign in to comment.