acarril / StataLinux

Sublime Text 3 plugin that adds support for Stata (all versions) in Linux.
MIT License
7 stars 2 forks source link

import path from os #3

Closed luispfonseca closed 4 years ago

luispfonseca commented 4 years ago

Thank you so much for working on this.

This PR hopefully fixes a bug I was having. When using the Command Pallette to Run All, nothing happened and I would get in the console:

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 1088, in run_
    return self.run(edit)
  File "/home/luis/.config/sublime-text-3/Packages/StataLinux/StataLinux.py", line 32, in run
    sublime_stata_sh_path = os.path.join(sublime.packages_path(), "StataLinux", "sublime-stata.sh")
NameError: global name 'os' is not defined

Since os.path.join is being called but os not being imported, I add a line to specifically import path from os and fix the name of that command in the file. Seems to be working on my machine now.

acarril commented 4 years ago

good catch, thanks! I must have deleted the line that imported os at some point.