Skip to content

Commit

Permalink
Merge pull request #176 from revesansparole/bug_plugin_project
Browse files Browse the repository at this point in the history
use option sorted
  • Loading branch information
revesansparole committed Sep 2, 2019
2 parents 3f9423d + b96d266 commit 59bfd1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/pkglts/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def regenerate_package(cfg, target=".", overwrite=False):

# find template files associated with installed options
rg_tree = {}
for name in cfg.installed_options():
for name in cfg.installed_options(return_sorted=True):
opt = available_options[name]
resource_dir = opt.resource_dir()
if resource_dir is None:
Expand Down
12 changes: 1 addition & 11 deletions src/pkglts/option/plugin_project/option.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,10 @@

from pkglts.dependency import Dependency
from pkglts.option_object import Option
from pkglts.small_tools import is_valid_identifier
from pkglts.version import __version__


def is_valid_identifier(name):
""" Check that name is a valid python identifier
sort of back port of "".isidentifier()
"""
try:
compile("%s=1" % name, "test", 'single')
return True
except SyntaxError:
return False


class OptionPluginProject(Option):
def version(self):
return __version__
Expand Down

0 comments on commit 59bfd1d

Please sign in to comment.