Skip to content

Commit

Permalink
Merge pull request skonfig#80 from skonfig/4nd3r/pass_cdist_error
Browse files Browse the repository at this point in the history
pass cdist errors because cdist prints its own errors
  • Loading branch information
sideeffect42 authored Oct 20, 2024
2 parents 9df3614 + e640208 commit c562872
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions skonfig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,13 @@


def run():
import cdist
import skonfig.cdist
if os.path.basename(sys.argv[0])[:2] == "__":
return skonfig.cdist.emulator()
try:
return skonfig.cdist.emulator()
except cdist.Error:
pass
import skonfig.arguments
parser, arguments = skonfig.arguments.get()
if arguments.version:
Expand All @@ -22,4 +26,7 @@ def run():
if arguments.dump:
import skonfig.dump
return skonfig.dump.run(arguments.host)
return skonfig.cdist.run(arguments)
try:
return skonfig.cdist.run(arguments)
except cdist.Error:
pass

0 comments on commit c562872

Please sign in to comment.