Skip to content

Commit

Permalink
remove spaces and dashes from plugin ids
Browse files Browse the repository at this point in the history
  • Loading branch information
jscott1989 committed Oct 5, 2016
1 parent 43b063d commit dff35df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/happening/management/commands/install_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def handle(self, *args, **options): # NOQA
plugin = src.Plugin

plugin_name = plugin.name
plugin_dir = plugin_name.lower()
plugin_dir = plugin_name.lower().replace(
" ", "_").replace("-", "_")
print('Linking %s to plugins directory' % plugin_name)
os.symlink("%s/src" % git_url[7:], 'plugins/%s' % plugin_dir)

Expand All @@ -44,7 +45,8 @@ def handle(self, *args, **options): # NOQA
plugin = src.Plugin

plugin_name = plugin.name
plugin_dir = plugin_name.lower()
plugin_dir = plugin_name.lower().replace(
" ", "_").replace("-", "_")
print('Copying %s to plugins directory' % plugin_name)
shutil.move('tmp_plugin_install/src', 'plugins/%s' % plugin_dir)
shutil.rmtree('tmp_plugin_install')
Expand Down

0 comments on commit dff35df

Please sign in to comment.