Skip to content

Commit

Permalink
Fixes potential trailing space in path problems.
Browse files Browse the repository at this point in the history
- Closes #17
  • Loading branch information
AlansCodeLog committed Nov 19, 2020
1 parent 1ea53d8 commit d02c4cb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def check_for_ptvsd():

#check in path just in case PYTHONPATH happens to be set
for path in sys.path:
path = path.rstrip("/")
if os.path.exists(path+"/ptvsd"):
return path
if os.path.exists(path+"/site-packages/ptvsd"):
Expand Down Expand Up @@ -167,7 +168,7 @@ class DebugServerStart(bpy.types.Operator):
def execute(self, context):
#get ptvsd and import if exists
prefs = bpy.context.preferences.addons[__name__].preferences
ptvsd_path = prefs.path
ptvsd_path = prefs.path.rstrip("/")
ptvsd_port = prefs.port

#actually check ptvsd is still available
Expand Down

0 comments on commit d02c4cb

Please sign in to comment.